> Neon syntax is not sensitive to whitespace, and does not have statement separators. Neon source code is case sensitive, but there are no requirements on the case of user-defined identifiers.
What's with the uppercase keywords? It was fine in BASIC and okay in SQL but I don't want to hold down my shift key that much while coding.
Docs mention that the uppercase keyword feature is inspired by Modula 2. However, I expect that most editors can highlight keywords so I don't see how this is a problem. If it is a problem it seems like there is a simpler solution.
It's a very pretty language. It's Pascal if Pascal were made perfect. Because it seems amenable to Hindley-Milner Type Inference, if it had that, it would be perfect. Imagine having beginners program in a Pascal-like language without having to worry about typing out types!
Dunno. Not having to type types is a must have feature for a hacker's choice language. I'm no educator, but I think the case could be made that in a statically typed language, you'd want beginners to think about types.
If I'm teaching young'ns per se using a toy language, I'd reach for Scratch. It's history and Google's embrace of it seem like strong endorsements. Are there other good candidates in that space?
If I'm teaching an intro class using a general purpose language, it's Ruby or Python. My heart lies with Ruby, but having basic Python chops is such a bigger win downstream.
for i in range(1, 101):
if i % 15:
print ('FizzBuzz')
elif i % 3 == 0:
print ('Fizz')
elif i % 5 == 0:
print ('Buzz')
else:
print (str(i))
(1..100).each do |i|
if i % 15 == 0
puts 'FizzBuzz'
elsif i % 3 == 0
puts 'Fizz'
elsif i % 5 == 0
puts 'Buzz'
else
puts i
end
end
I actually really like that somebody finally used decimal floating point as the default.
The problem is that any small language must have a way to reliably manipulate integers properly, or it's just not getting anywhere. It's okay for that to not be the default, but it must exist.
I dont understand this unspoken contest to make new programming languages look like archaic ones from the 1960's. No beginner programmer wants to see := or upper case keywords.
While I agree in the case of upper case keywords, I consider := and = to be actually better than = and ==. That would also help to avoid syntactical abominations like === and !==.
I couldn't agree more. I grew up using Pascal and am currently teaching C++ for undergrads; I often realize that some errors done by the students could have been prevented, had they used Pascal.
It's not only a matter of clarity in using an asymmetric := for assigning the right side to the left side (the "=" symbol suggests that left and right side play the same role). The biggest problem is rather the fact that it's so common for newbies to write "=" when they want to express equality. (I teach in a physics department, and the mathematical background of my students is extremely solid.)
On the contrary, I believe the example already tells something. Consider all the boilerplate you have to put around the "print" statement when you write the same program in C++ or Java:
#include <iostream> // Needed to use std::cout
int main() { // You need to wrap the code into a "main" function
std::cout << "Hello, World.\n";
}
At least, the example shows that Neon is in the same ballpark as Python, Ruby, Nim, etc.
“Neon is a high-level, statically typed, garbage collected, imperative programming language intended for teaching and learning the craft of programming.”
34 comments
[ 2.9 ms ] story [ 64.4 ms ] threadhttps://github.com/ghewgill/neon-lang/tree/master/samples
Seems like a work in progress, other sections of the docs (like the tutorial) are blank as well.
What's with the uppercase keywords? It was fine in BASIC and okay in SQL but I don't want to hold down my shift key that much while coding.
If I'm teaching an intro class using a general purpose language, it's Ruby or Python. My heart lies with Ruby, but having basic Python chops is such a bigger win downstream.
The problem is that any small language must have a way to reliably manipulate integers properly, or it's just not getting anywhere. It's okay for that to not be the default, but it must exist.
It's not only a matter of clarity in using an asymmetric := for assigning the right side to the left side (the "=" symbol suggests that left and right side play the same role). The biggest problem is rather the fact that it's so common for newbies to write "=" when they want to express equality. (I teach in a physics department, and the mathematical background of my students is extremely solid.)
> print("Hello, World.")
Literally the least interesting thing about any language.
That's not even as concise, clear and beautiful as Python 2 or BASIC:
print "Hello, World."
and:
“TODO: Tutorial goes here”
Says it all, really.
..
Pascal is [thataway](https://www.freepascal.org/) for those that care.