Click here to Skip to main content
15,897,518 members

Survey Results

Random style question: Which variable declaration do you prefer?

Survey period: 22 Jul 2019 to 29 Jul 2019

Strict formalism or fast and loose? Typesafe or no type at all? For anyone who switches languages often this can get messy.

OptionVotes% 
int count (Standard C-style)76666.78
count: Integer (eg Pascal)342.96
var count: int, or val count: Integer (eg TypeScript)201.74
var count int (eg Go)191.66
Declare @count int (eg SQL)161.39
Dim Count As Integer (eg VB)786.80
Count = 1 or $count = 1 (eg Python or PHP)282.44
(defvar count 1) (eg LISP, and similar in Scheme)20.17
Other272.35
I'm not fussed. Whatever works.15713.69



 
GeneralOf course the C++ moh-dern-ist Pin
Dean Roddey28-Jul-19 2:49
Dean Roddey28-Jul-19 2:49 
Generalnot picky Pin
Matt McGuire24-Jul-19 5:20
professionalMatt McGuire24-Jul-19 5:20 
GeneralThe result indirectly tells that people are more comfortable in C/C# type language Pin
Anurag Gandhi23-Jul-19 7:01
professionalAnurag Gandhi23-Jul-19 7:01 
GeneralCan we give anything to old BASIC? Pin
bryanren23-Jul-19 6:08
bryanren23-Jul-19 6:08 
GeneralRe: Can we give anything to old BASIC? Pin
OriginalGriff24-Jul-19 10:07
mveOriginalGriff24-Jul-19 10:07 
GeneralRe: Can we give anything to old BASIC? Pin
bryanren24-Jul-19 13:38
bryanren24-Jul-19 13:38 
GeneralRe: Can we give anything to old BASIC? Pin
OriginalGriff24-Jul-19 19:09
mveOriginalGriff24-Jul-19 19:09 
Generalwhy was C# left out ? Pin
BillWoodruff23-Jul-19 4:16
professionalBillWoodruff23-Jul-19 4:16 
GeneralAny option with strict typing Pin
obermd23-Jul-19 3:20
obermd23-Jul-19 3:20 
GeneralAnother Missing Option Pin
Slow Eddie23-Jul-19 3:20
professionalSlow Eddie23-Jul-19 3:20 
GeneralRe: Another Missing Option Pin
Chris Maunder23-Jul-19 3:41
cofounderChris Maunder23-Jul-19 3:41 
GeneralRe: Another Missing Option Pin
Kirk 1038982123-Jul-19 4:20
Kirk 1038982123-Jul-19 4:20 
It's a solid question.

I, like many others, appear to prefer the C style.

One think I liked about the C style was

int a,b,c,d[12]; // so concise, and it emphasizes the types

I use pascal/Delphi a lot, so I have to do:

a,b,c: Integer;

Which honestly makes it harder to split and document at the end of the line.

But with most of todays editors, I am surprised you did not commonize Ctrl-D,V (Define Variable),
to be dynamic depending on the language you are using.

As an Oracle person, I trip up on MSSQL syntax, so my MSSQL editor has Oracle keywords defined to inject comments (TO_DATE(), NVL -> Coalesce(), etc)
And the same for SQLite, and MySQL. Otherwise I lose my sanity.

Finally it looks like it would fit on a 3x5 card
Oh, and I use AHK for date formatting file names with todays date, with a popup.
And I have another popup that reminds me all of the hotkeys, LOL
Screenshot

So I only have 1 hot key to remember (Win-H, for Help, LOL)

Reminds me of the old TSRs in DOS days!
GeneralRe: Another Missing Option Pin
Slow Eddie23-Jul-19 5:59
professionalSlow Eddie23-Jul-19 5:59 
GeneralRe: Another Missing Option Pin
raddevus24-Jul-19 7:58
mvaraddevus24-Jul-19 7:58 
GeneralI'm not fussed Pin
MarkTJohnson23-Jul-19 2:52
professionalMarkTJohnson23-Jul-19 2:52 
GeneralRe: I'm not fussed Pin
raddevus24-Jul-19 7:52
mvaraddevus24-Jul-19 7:52 
GeneralMissing option Pin
Gary Wheeler23-Jul-19 1:34
Gary Wheeler23-Jul-19 1:34 
GeneralLife is no longer so simple Pin
Marc Clifton22-Jul-19 7:53
mvaMarc Clifton22-Jul-19 7:53 
GeneralRe: Life is no longer so simple Pin
Slacker00722-Jul-19 10:25
professionalSlacker00722-Jul-19 10:25 
GeneralYou missed C# inferred style. Pin
nmarcel22-Jul-19 3:10
nmarcel22-Jul-19 3:10 
GeneralRe: You missed C# inferred style. Pin
PeejayAdams22-Jul-19 4:42
PeejayAdams22-Jul-19 4:42 
GeneralRe: You missed C# inferred style. Pin
Scott Serl22-Jul-19 9:21
Scott Serl22-Jul-19 9:21 
GeneralRe: You missed C# inferred style. Pin
OriginalGriff22-Jul-19 9:29
mveOriginalGriff22-Jul-19 9:29 
GeneralRe: You missed C# inferred style. Pin
Slacker00722-Jul-19 10:24
professionalSlacker00722-Jul-19 10:24 
GeneralRe: You missed C# inferred style. (C# is essenially C++ as far as BNF concerned) Pin
steveb27-Jul-19 3:41
mvesteveb27-Jul-19 3:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.