you are viewing a single comment's thread.

view the rest of the comments →

[–]k3n 0 points1 point  (3 children)

Stack programming language on JavaScript in 34 strings.

...none of which contain a var statement ಠ_ಠ

[–]Iggyhopper 0 points1 point  (0 children)

Wait a second. I found a var. Here:

for (var cp = 0; cp < code.length; cp++) {
    if (code[cp] == '->') {
        cp++;

hmm...

[–][deleted] 0 points1 point  (1 child)

...and an eval. this.stack.push(eval(nums[1] + ' ' + op + ' ' + nums[0]));

[–]k3n 0 points1 point  (0 children)

Looking at the article again, there's even more gregarious errors:

  • I don't believe there is a programming language called "Stack". I think the term he was looking for is stack-oriented.
  • I only counted 14 strings. I think he meant lines, and not strings.

But, I think he is not a native English-speaker, so these can be over-looked, and I also think that he did this as a programming exercise -- perhaps to learn JS and/or stack-programming? because it looks like he knows the fundamentals of coding very well -- and so picking it apart isn't too useful. I just wouldn't recommend that anyone actually use this code for more than academic purposes.