Click here to Skip to main content
15,887,683 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 
would probably say that indicating a type explicitly is is old people coding. I utterly disagree, but there are a lot of people who take that approach. Having recently been going through a large chunk of someone else's code, I've found that having to hover over everything to get the IDE to show me what it is (and sometimes the IDE doesn't show me what it is for whatever reason) slows me down a lot. Even after I've hovered, I can't remember the types of more than a small number of things at once when digging into code I don't know, so I have to hover some more.

Leaving aside that being unexplicit is the opposite of what we should be doing, it's just not good for readability.
Explorans limites defectum

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 
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.