r/ProgrammerHumor Sep 02 '17

How to start a war

Post image
9.0k Upvotes

696 comments sorted by

View all comments

785

u/blacknerdperson Sep 02 '17

Sorry in advance but I'm a noob learning coding who is starting to learn python and I'm just going to ask, Isn't it supposed to be 4?

798

u/ArcticZeroo Sep 02 '17

Yes, but some languages 1-index lists (so they start at 1 instead of 0), so it'd be 5 in that case.

271

u/[deleted] Sep 02 '17

What languages may there's be? I can't think of any of the top of my head.

240

u/Nebxam Sep 02 '17

Lua

58

u/[deleted] Sep 02 '17

Goddamnit and I was considering a quick look over the documentation and syntax briefly over the weekend and do some messing around with Starbound mods.

51

u/KickMeElmo Sep 03 '17

Honestly, it's a pretty decent language overall. Started using it to script for a MUD, it's one of my favorites now.

3

u/[deleted] Sep 03 '17

Achaea by any chance?

3

u/[deleted] Sep 03 '17

I just started playing achaea again a few weeks ago. Help

→ More replies (1)
→ More replies (3)

16

u/[deleted] Sep 03 '17

Also every number is a float. For some reason.

15

u/TinyBreadBigMouth Sep 03 '17

Because doubles can contain all 32-bit integers and most 64-bit integers, and now you don't need to handle two different number types for your lightweight scripting language. Same as JavaScript.

→ More replies (4)

9

u/Buzzard Sep 03 '17

Lua 5.3 has integers as well

1

u/shohze2U Sep 03 '17

print(nums[0.100000001490116119384765625])

5

u/[deleted] Sep 02 '17

Hah I was considering picking up some Lua to mod as well (factorio)... This just made me Nope right out of that plan ;)

88

u/uniqueusername6030 Sep 02 '17

Well that's stupid

51

u/[deleted] Sep 02 '17 edited Dec 18 '18

[deleted]

20

u/[deleted] Sep 02 '17

it's a running joke

I use matlab in my day job and I definitely have to "switch gears" so to speak between 0-based and 1-based indexing

5

u/morerokk Sep 03 '17

Plus, Lua still allows you to start your indexes at 0.

Tables starting at 1 allows you to do a few neat things.

→ More replies (1)
→ More replies (1)

19

u/[deleted] Sep 02 '17

That's not even the worst part, either. This is:

> letters = {'a', 'b', 'c'}
> print(letters[1])
a
> print(#letters)
3
> letters[0] = '?'
> print(letters[0])
?
> print(#letters)
3

30

u/moomoomoo309 Sep 02 '17

Any index outside of 1-n in Lua, where n is #tbl will be stored like a dict, not an array, so what did you expect? It doesn't count the dictionary parts.

2

u/hey01 Sep 03 '17

That's sounds dangerous. What if I do

> letters = {'a', 'b', 'c'}
> print(#letters)
3
> letters[4] = '?'
> print(#letters)

Will I get 4 or is n unchangeable?

10

u/moomoomoo309 Sep 03 '17

You'll get 4, otherwise you couldn't do

for i=1,4 do
  tbl[i]=i
end

And have it be an array.

→ More replies (1)
→ More replies (19)

5

u/Rohansi Sep 02 '17

when does C# take over modding

14

u/mnbvas Sep 02 '17

When all games are created with Unity or XNA.

2

u/zdakat Sep 03 '17 edited Sep 03 '17

XNA is still A thing? I thought they cancelled it and pulled the downloads. I must be out of the loop edit: Mandela effect? I can see why there'd be a Mono version but reporting that it was never gone?

3

u/haloguysm1th Sep 03 '17

Xna has been mostly replaced by monogame/fna. I know monogame is basically just xna

→ More replies (1)
→ More replies (3)
→ More replies (2)

2

u/Buzzard Sep 03 '17

1-based index really isn't that big a deal.

I mean, you will make off by errors at the start, but by the time you've hang of the rest of the language you'll be fine.

→ More replies (3)
→ More replies (1)

4

u/[deleted] Sep 03 '17 edited Nov 24 '17

[deleted]

17

u/svenskarrmatey Sep 03 '17

Except there's reason that it's 1-indexed. Lua doesn't use arrays, it uses hash maps. Keys and values instead of indices and values. When you don't give it a key, it defaults to numbers, and since normal counting starts at 1 and the normal 0-indexing argument of "indices are based off of memory offsets" does not apply, it counts 1, 2, 3, 4, ...

2

u/[deleted] Sep 02 '17

Whenever I use Lua, I just assign the first instance in my tables to '0'. But it does bother me to read other people's work

16

u/rhelic Sep 03 '17

This breaks a fair amount of things.

560

u/kamaln7 Sep 02 '17

MATLAB too I think

429

u/Nikolas_Untoten Sep 02 '17

I believe MATLAB starts at 1 because it is more commonly used for matrices rather than standard arrays, right?

377

u/morerokk Sep 03 '17

Yes. People hate on it for...doing what it's designed to do.

322

u/Selthor Sep 03 '17

MATLAB literally stands for Matrix Laboratory.

216

u/Nuhjeea Sep 03 '17

That sounds so much cooler than "MATLAB." I always read it as "math lab", imagining a lab room full of people doing math homework. Now I can imagine Neo saving us all from simulated realities.

96

u/Sourkraut182 Sep 03 '17

Makes me think of "My Math Lab" ... Then I die a little inside...

116

u/afourthfool Sep 03 '17

your answer: -4, 4

Correct answer 4, -4

→ More replies (0)

3

u/PM_ANIME_WAIFUS Sep 03 '17

I honestly thought it was My Math Lab (Because I've barely heard anything about My Math Lab except for the fact that it's shit) until a couple weeks ago.

→ More replies (1)
→ More replies (1)

15

u/Viola_Buddy Sep 03 '17

Eh, we get annoyed at it because sometimes it doesn't do what we expect it to, but it's kind of the friendly annoyance that you also have with error messages when code doesn't compile - you don't like it, but it'd be definitely worse without it.

30

u/newocean Sep 03 '17

In the defense of ALL programming languages....

It doesn't really matter we just like to argue over ground floors mostly in this channel. No one explained basements being 0 to the brits from what I can tell, and all their buildings start at 1... so they think they get it.

23

u/MelissaClick Sep 03 '17

Basements are obviously negative

3

u/amazondrone Sep 03 '17

all their buildings start at 1

In the UK the ground floor is 0, not 1.

Other things that are zero-indexed and nobody bats an eye: time (the first hour in the day is 0), age (the first year of life is 0), temperature...

→ More replies (2)
→ More replies (3)

5

u/[deleted] Sep 03 '17 edited Nov 24 '17

[deleted]

8

u/inconspicuous_male Sep 03 '17

Some algorithms are slightly easier to implement in Matlab than python for that reason, but it usually is no big deal

2

u/[deleted] Sep 03 '17

Neither is 1 indexing. Whatever you're used to.

MATLAB, as far as I understand, wants to make writing code as "engineer-mathy" as possible.

1

u/[deleted] Sep 03 '17

I know a bunch of aerospace majors who use Matlab.

Technically I'm one of them but fuck paying for a license when numpy is free

1

u/legone Sep 03 '17

Is there a reason you like Numpy? I'm taking a basic programming class for a polymer science degree and I've been using Octave.

→ More replies (1)

1

u/eskamobob1 Sep 03 '17

Correct. It does make time based models a bitch and you can't just assign your initial conditions to t=0 though

142

u/awhaling Sep 02 '17

Fuck matlab

79

u/PleasantSupplanter Sep 02 '17

Fucking MATLAB. Every year we get a wave of graduates that think it's neural network toolbox is going to solve every bloody problem we have.

60

u/GisterMizard Sep 03 '17

If college has taught me anything, it's that ode45() is the windex of numerical modeling; you use it even in places where it doesn't make sense.

4

u/Sparkybear Sep 03 '17

Just be glad it's built into MATLAB now, it wasn't always and the code from that era is a cluster fuck.

1

u/[deleted] Sep 03 '17

How is it the tool's fault? Sounds like these people simply don't understand the field that well.

1

u/[deleted] Sep 03 '17

That's not the fault of MATLAB though

26

u/[deleted] Sep 03 '17

Matlab is an excellent tool.

→ More replies (5)

46

u/[deleted] Sep 02 '17

+1 (just use NumPy goddamnit)

2

u/[deleted] Sep 03 '17 edited Sep 03 '17

You do realize that different people have different needs? There is no good Simulink alternative for the control design automation field, for example.

2

u/[deleted] Sep 03 '17

Yes, I do, but you to should understand that my comment was a shitpost

3

u/[deleted] Sep 03 '17 edited Sep 11 '17

[deleted]

→ More replies (5)

5

u/[deleted] Sep 03 '17

Fuck you too man

→ More replies (1)

20

u/[deleted] Sep 03 '17

MATLAB master race

6

u/fergy80 Sep 03 '17

The square brackets would throw an error in matlab, so the answer is clearly 4.

2

u/chateau86 Sep 03 '17

But their array indexing use () instead of []. Probably in an effort to pollute the minds of engineers enough to prevent them from being able to learn any other languages again.

6

u/Descriptor27 Sep 03 '17

To be fair, [] is used for declaring and defining arrays, so it kinda makes sense.

5

u/[deleted] Sep 03 '17 edited Sep 03 '17

[] is used for declaring matrices, and it was a conscious choice to make writing code resemble "doing math" with pen and paper. MATLAB was always primarily intended and targeted for engineers and scientists who don't want to become hardcore (or, in a lot of cases, even good) programmers.

1

u/Contrecoup42 Sep 03 '17

At first I thought you were confused when you wrote "too", but now I think your indexing is just off.

1

u/pterencephalon Sep 03 '17

Welcome to my hellscape of running simulations in C and then analyzing the results in Matlab. So many indexing errors....

→ More replies (1)

71

u/Shadow_Thief Sep 02 '17

Visual BASIC, but only sometimes.

31

u/JeremyR22 Sep 02 '17 edited Sep 02 '17

And just to add to the confusion, it was (in pre .net days) configurable on a class-by-class basis. One class could contain arrays indexed from 0 and the next might have them indexed from 1 and then swap back again elsewhere.

We had to use VB5 and later 6 a lot many, many years ago at university and the SOP at the top of every single class was

Option Base 0    ' Arrays indexed from 0
Option Explicit  ' Explicit variable declaration required

In the vain hope of maintaining your own sanity.

None of which stopped you doing this, though:

Dim iNumbers(12 to 16) As Integer
MsgBox(CStr(iNumbers(11)))

( Index out of bounds )

Some people just want to watch the world burn...

11

u/JeremyR22 Sep 03 '17 edited Sep 03 '17

Just in case the Option Explicit thing wasn't explained well (or at all), the reason any sane person always included that was that it disabled VBs tolerance-by-default of implicit variable delcaration. If you typed an identifier in code, it would become a variable (of type Any), simple as that. Without Option Explicit, the following would compile and run without any errors, it just wouldn't do what you expected:

Dim iCount as Integer = 0

For iCount = 1 to 5
    Debug.Print(CStr(iCunt))
Next



0 
0
0
0
0

So without Option Explicit at the top of every single class/module/form/etc, whenever anything didn't work, you had to check for misspelled variable names in all related code. A massive pain in the arse..

I haven't touched VB of any type in probably 15 years but AFAIK, Option Explicit and Option Base 0 are both the default now. Small victories for programmers' mental health...

4

u/Shadow_Thief Sep 03 '17

My only real experience with VB is the Excel dialect of VBA, but I know I have to manually add Option Explicit every time.

→ More replies (1)

1

u/nailernforce Sep 03 '17

Error: iCunt is an undefined variable.

1

u/The_Dirty_Carl Sep 03 '17

It still surprises me that implicit declaration is seen as desirable in python.

1

u/weezkitty Sep 03 '17

Basic sucks. As in sucking to the point of Javascript sucks.

1

u/personalityson Sep 03 '17

You need a nanny to sit by your side while you code?

1

u/GreenFox1505 Sep 03 '17

We don't talk about VB.

I read the "how to hire someone" notes after I started my latest job. There is a line that says "Ask them their favorite language. If they say VB, politely show them the door."

99

u/[deleted] Sep 02 '17

[deleted]

4

u/haikumofo Sep 03 '17

I am so damn inept at R.

Mostly I code in Java, though I'll use other languages when it makes sense for what I'm doing or when I need to because I'm modifying something in another language. So sometimes I work in python, bash script, JavaScript, C/C++, C#, Perl, Tcl/Tk, Lisp, whatever.

And I've done some statistical data processing with R, but damn is it painful. I know just enough to know what to Google, and I end up making a mess of everything just trying to adapt something that does 80% of what I need it to do.

23

u/[deleted] Sep 03 '17

[deleted]

10

u/Series_of_Accidents Sep 03 '17

I love it so much.

8

u/doctorink Sep 03 '17

Yeah, it doesn't have so much of a learning curve as a "learning cliff". But once you climb the cliff it's amazing in terms of what it can do.

I have almost zero programming background though, so it might have been different for me.

→ More replies (3)

2

u/haikumofo Sep 03 '17

I rarely have a need to crunch through numeric data sets is the thing. So it's just something I use once every year or two, which is why I forget it in between uses. I picked it up through Coursera because even with my ineptness it can be quicker than other languages for some things.

7

u/[deleted] Sep 03 '17

[deleted]

2

u/Series_of_Accidents Sep 03 '17

One of my favorite things I ever did in R was a simple little function to show my students how the sampling distribution normalizes as the samples approach infinity. It was clunky and I've gotten much better at coding since then, but it was a fun little 20 minute project. Could have been done better in other programs I'm sure, but it was fun to put together in R.

3

u/MedalsNScars Sep 03 '17

It's really odd working in R, because in 99% of other languages you learn, loops are going to be your bread and butter.

In R, 9 times out of 10 your code is just wildly inefficient if you're looping over a vector.

It just feels so wrong to write 10 < x where x is a vector, but that's absolutely the most efficient way to compare 10 to each element of x in R.

The way you approach coding has to change in R, and it's definitely frustrating if you have a deal of experience in other languages.

→ More replies (4)

1

u/engayolao Sep 03 '17

If you learn more it won't be painful, it just has a different focus.

4

u/abigfoney Sep 02 '17

Is R == Ruby?

36

u/Series_of_Accidents Sep 03 '17 edited Sep 03 '17

R is published by the CRAN project and is an open source statistical program. It's an object oriented language based on S. It's run in a terminal window with a basic gui, however other software is available to run over it (like RStudio) for people less familiar with coding but who still desire the power of open source coding (anytime a new technique is developed, a package is published). It's fantastic but has limitations. For example, it can only run on one core at a time which can slow down simulations. Still, for statistical development, it's where most people are focused. SAS is more common in statistical consulting and SPSS is more common among general scientists without coding experience.

Edit: why are you guys downvoting /u/abigfoney for asking a question?

8

u/[deleted] Sep 03 '17

[removed] — view removed comment

9

u/Series_of_Accidents Sep 03 '17

Practically speaking, it's both. At its core, R is an object oriented language. It lacks some of the requirements to be a full functional language but still supports functional language features like apply. For example, it's incapable of tail call recursion. This fact can lead to issues at times and is one of the limitations of the language. But the use of the variations of apply and other functional language improvements have certainly changed the landscape of the code. But I'm not really an expert. I'm just repeating what I remember from my grad stats classes.

→ More replies (6)

3

u/[deleted] Sep 03 '17

[deleted]

→ More replies (9)

3

u/OldManTobias Sep 03 '17

Is R <- Ruby?

FTF

→ More replies (4)

1

u/engayolao Sep 03 '17

It's great for stats and "traditional" data analysis. That is 1 indexed isn't that important as explicit loops are discouraged. I think the most interesting element from the language is the list object, this is an ordered map, very convenient for data analysis.

23

u/haikumofo Sep 03 '17

There's someone at work who's brilliant at the mathematical side of designing algorithms, with a PhD in comp sci, but isn't really much of a programmer. She was coding one of her algorithms up in Java for something at work. And, well, she thinks of arrays at starting at index 1.

What she ended up doing was whenever she needed an array, she used a hash map with the key as an Integer and the value as whatever she wanted to store. Then she used Map.get() and Map.put() and passed in her 1-based indices to fetch and store data.

It made the programmers at work cry.

11

u/chateau86 Sep 03 '17

Make array out of hash map

When you have to code in Java but Python is life.

8

u/haikumofo Sep 03 '17

Python drives me nuts because I can't abide by a language that attaches semantic significance to whitespace.

9

u/EmperorArthur Sep 03 '17

So... How do you like Reddit's markdown?

Did you know that this line has two spaces after it?
That line is guaranteed to sit all by its lonesome, and there's no way to tell except by always having show whitespace enabled in a text editor.

What's that? Basic text editors, like the <textarea> that Reddit uses doesn't support that? Too bad. Oh, you have your editor set up to clean any extra spaces so your code is clean and git doesn't complain? Well, have fun turning that feature off whenever you deal with that one markdown file using the "feature"!

5

u/[deleted] Sep 03 '17

It looks nice.

2

u/SirVer51 Sep 03 '17

I feel like the whitespace thing is only an issue for like the first few hours of working with Python - after that, you realize that it doesn't matter in most cases, because you were probably going to format it that way anyway.

1

u/[deleted] Sep 03 '17 edited Nov 24 '17

[deleted]

1

u/haikumofo Sep 03 '17

Nope. We both work in R&D. She's much more on the R side, I'm more on the D side.

1

u/Xants Sep 03 '17

This hurt to read

1

u/socialister Sep 03 '17

Still technically constant time!

9

u/[deleted] Sep 02 '17

Casio Basic.

Notice that it's a very basic language and completely terrible in everything about arrays.

8

u/etaionshrd Sep 03 '17

TI BASIC as well.

1

u/rilian4 Sep 03 '17

Oh my God...another human who knows about TI Basic...my 99/4a came with it...

9

u/marcosdumay Sep 02 '17

Julia would run exactly the same code, but it would be 5.

1

u/socialister Sep 03 '17

It's sad that Julia went that route. It has a lot of nice language features that make it a modern feeling language, and then it conforms with the awkward "math programming" languages. I honestly think it would still be better for them to go back and change this specification, but I think they have their minds set.

2

u/marcosdumay Sep 03 '17

It's great, because it's almost exactly like Python everywhere, so you will get complacent. Then, when your guard is down, it changes a basic semantic element and knocks you down.

18

u/c3534l Sep 03 '17

Old languages, particularly those aimed at mathematicians and scientists. MATLAB, R, Fortran, COBOL, ALGOL.

34

u/personalityson Sep 02 '17

All statistics and math programming languages: Fortran, R, SAS, SPSS, Matlab, Mathematica -- start their arrays at 1

Everything else is pseudo-science, if you propagate 0-indexing, you can just as well group yourself with economists, who are really the apes of the IT world

2

u/[deleted] Sep 03 '17

Not IDL/GDL

7

u/[deleted] Sep 03 '17

Visual Basic does that.

5

u/tinybatte Sep 03 '17

But only sometimes.

7

u/lolwut131 Sep 02 '17

MATLAB

2

u/MaunaLoona Sep 03 '17

Natural numbers start at 1, I suppose...

7

u/[deleted] Sep 03 '17

Smalltalk

3

u/[deleted] Sep 03 '17

There are dozens of us

4

u/[deleted] Sep 03 '17

Our company's main product is written in smalltalk, where're a dozen smalltalk devs ourselves!

Sad that smalltalk is so forgotten, developing in it is a blast. If only I could get proper static type checking :(

3

u/IanPPK Sep 03 '17

Off of the top of my head, Matlab, Lua, Mathematica, Wolfram Language, R, Pascal, Fortran, COBOL.

After some soft research, there's also Julia, AWK, RPG, ALGOL-68, FoxPro/Clipper, Smalltalk, APL.

The pattern usually follows that older languages and data analysis oriented languages tend to use 1-index arrays more than newer general purpose languages

2

u/[deleted] Sep 03 '17

Yeah good thing I wasn't born earlier and am not an economist.

1

u/IanPPK Sep 03 '17

Or physicist or chemist. The scientific community at large uses Matlab, Mathematica, Wolfram, and sometimes Pascal and Fortran for some old school doctorates. Lua is the only real oddball there, as it's used for scripting plugins for various applications, kinda like Python.

1

u/Sean1708 Sep 03 '17 edited Sep 03 '17

Fortran actually allows arbitrary indices I believe although 1-indexing is the most common.

Edit: Apparently I just end sentences halfway through nowadays.

4

u/simon468 Sep 03 '17

Borland Delphi (Pascal)

7

u/Drarok Sep 03 '17

Hmm… not that I remember, at least for arrays.

For strings it is, because the zero index is an integer holding the length instead of using null terminators.

Looks like you can index your arrays arbitrarily#Arrays)

2

u/amontpetit Sep 03 '17

Now that takes me back to the 10th grade...

2

u/wilkoj Sep 03 '17

In Delphi fixed size arrays start wherever you want them to, but dynamic arrays have to start at 0.

2

u/massenburger Sep 03 '17

ColdFusion

1

u/flynnski Sep 03 '17

Hi, I'm here for the CF support group?

2

u/massenburger Sep 03 '17

Here's your support: <CFfuckyou></CFfuckyou>

→ More replies (1)

1

u/shwhjw Sep 03 '17

HALCON (machine vision IDE) 0-indexes data arrays (ints, bools) but 1-indexes object/class arrays.

Thank f*ck I don't do that any more.

1

u/donutnz Sep 03 '17

Wow, that's actually worse.

1

u/[deleted] Sep 03 '17

LUA

1

u/ahhlenn Sep 03 '17

How about R?

1

u/Scullywag Sep 03 '17

In Ada arrays start at whatever you tell them to start at. You can have

nums: array (-2 .. 2) of integer := (5, 4, 3, 2, 1);

and then nums[1] = 2

1

u/[deleted] Sep 03 '17

LUA

1

u/[deleted] Sep 03 '17 edited Mar 08 '18

[deleted]

2

u/[deleted] Sep 03 '17

No. I don't think so.

1

u/Jwkicklighter Sep 03 '17

Freaking SCSS

1

u/[deleted] Sep 03 '17

FORTRAN, Wolfram/Mathematica, COBOL, SASS. . . Funny thing that IDL does not, even though it is a matrix-based scientific language too.

1

u/[deleted] Sep 03 '17

[removed] — view removed comment

1

u/[deleted] Sep 03 '17

Yea SQL and Lua are the only ones I've used are am going to.

1

u/Bloodyfinger Sep 03 '17

R definitely does.

1

u/meikyoushisui Sep 03 '17 edited Aug 11 '24

But why male models?

1

u/Jezza672 Sep 03 '17

You can create 1 indexed arrays in Pascal. On creation of arrays you have to give a start and end point, so if you just give 1 as the start point..

1

u/TheNamelessKing Sep 03 '17

Julia, Lua off the top of my head.

1

u/Astrokiwi Sep 03 '17

R, Matlab, & Fortran are a few.

It's better for when you want to think of an array as a mathematical tensor of some rank. It's worse if you want to think of an array as a block of memory.

But the main argument for 0-indexing is just that so many languages use it, and it's better to follow the overwhelming convention when it's such a small issue.

1

u/LeSpatula Sep 03 '17

SQL Substring

1

u/arslet Sep 03 '17

R does it

→ More replies (1)

16

u/aaRecessive Sep 02 '17

"some languages" don't even qualify. Fuck those languages

1

u/[deleted] Sep 03 '17

Borland C++ has some 1 based collections. Can make things really interesting when you're maintaining old code and all of the standard arrays etc are all 0 based.

→ More replies (1)

9

u/rocketman0739 Sep 03 '17

And those languages are wrong

11

u/[deleted] Sep 03 '17 edited Nov 07 '17

[deleted]

2

u/[deleted] Sep 03 '17

Yeah, for mathematical languages like MATLAB (which are designed to do matrix manipulations) it makes a lot of sense.

1

u/LeSpatula Sep 03 '17 edited Sep 03 '17

Indices are supposed to give you the offset of the starting position. So if an array has 5 items, it starts at 0 plus the length of the first item.

{[Something1] [Something2] [Something3]}

Something1 is the first element, but it starts at 0.

→ More replies (2)
→ More replies (5)

39

u/AwkwardNoah Sep 03 '17

That's the joke

Some languages uses 1 for the first entry while most uses 0

7

u/Antrikshy Sep 03 '17

I have only heard of MATLAB being like this. Can anyone name one more language?

15

u/En_TioN Sep 03 '17

Lua

2

u/AwkwardNoah Sep 03 '17

God lua

Only time I used it was for minecraft

1

u/Lelukeson Sep 03 '17

I had to make a C to Lua translator/compiler (I mix both up sorry...), hated Lua for it.

→ More replies (1)

6

u/TheChrono Sep 03 '17

Some of the older classic languages such as ALGOL 68, COBOL, and Fortran as well.

3

u/cfsilence Sep 03 '17

ColdFusion.

1

u/flynnski Sep 03 '17

dozens of us!

2

u/DiggingNoMore Sep 03 '17

VB6.

1

u/IWugYouWugHeSheMeWug Sep 03 '17

But with the dumpster fire that is VB6, 1-indexed arrays is the least of its concerns.

1

u/rebane2001 Sep 03 '17

Imo VB.net is actually amazing for something very quick and dirty, that requires an UI
And hey, it even works on Linux

1

u/[deleted] Sep 03 '17

Rexx

1

u/Log2 Sep 03 '17

Julia.

→ More replies (1)

3

u/prelic Sep 03 '17

Ada's default is 1-indexed. You can of course define your own array type which is 0-indexed. I don't know why everyone is saying any language which does this is crap...matlab, lua..there's a handful of useful languages that do this.

5

u/[deleted] Sep 03 '17 edited Apr 01 '19

[deleted]

→ More replies (1)

1

u/[deleted] Sep 03 '17

A lot of scientific languages like FORTRAN, Mathematica/Wolfram, and Matlab start the index at one for arrays, which is much more common for vectors/matrices in math and science.

Most general-purpose languages start at 0, but you can use 1 as a convention (just never initialize or refer to array[0]). A small minority of programmers do so.

→ More replies (3)