Building main executable... src/types.cpp: In member function 'TypeStatus::operator uintptr_t() const': src/types.cpp:1514: error: cast from 'Type*' to 'unsigned int' loses precision
Anic -- Faster than C, Safer than Java, Simpler than *sh
61–70 of 96 posts
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#62Earlier quoted context omitted.
I'd argue that Python is very easy to read for someone new to programming, particularly someone familiar with mathematical notation. Something like: for animal in ['dog', 'cat', 'bear']: print animal strikes me as intuitive and obvious, both absolutely and also relative to the equivalents in other languages.
That is not necessarily a sign of a good language, though. ADD 1 TO COBOL GIVING COBOL is also readable, and yet (thankfully!) we've mostly abandoned COBOL. And no, I'm not saying Python is bad, or like COBOL - just that readability and quality of a language are not necessarily related.
Python is readable because its syntax is very close to many people's version of pseudocode. This is why non-Python programmers find it easy to read.
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#63Earlier quoted context omitted.
Frankly there isn't a language in existence that's "easy to read" and I'm kind of sick of seeing that claim. There's no way you can read anyone's code without knowing at least something about the language. That said, I really like the ideas this language is offering and I'm definitely interested in giving it at try.
I'd argue that Python is very easy to read for someone new to programming, particularly someone familiar with mathematical notation. Something like: for animal in ['dog', 'cat', 'bear']: print animal strikes me as intuitive and obvious, both absolutely and also relative to the equivalents in other languages.
I'd agree that programming languages do have various levels of "readability", and that Python is better than quite a few...
However I think the poster has a point.
Someone familiar to programming concepts and new to Python could probably read that...but so could they read the equivalent statement in most languages.
Someone completely new, and reading only that statement?
I'm not convinced....
It seems obvious to you because you know it already.
As a newbie, I could see that as assigning an entire list to animal and then printing it...or even other things. I wouldn't be sure what the : was about
Additionally I think a similar for loop in any language will be basically just as readable to a complete newbie...in fact some may find a c-style for loop more readable.
For example, do you really think a newbie will understand this:
def __gen(exp):
for x in exp:
yield x**2
g = __gen(iter(range(10)))
print g.next()
Sure, it's pretty easy to understand once explained ...but so are most languages. It's obviously more readable than a Perl one-liner, and Python has properties that cause it to generally be more readable than many other languages....but I think the point about programming languages overall being "not so readable" stands.This makes sense though, as generally what people seem to mean by "readable" is "looks like English/forms a narrative"...and those often don't fit with what a computer program is (though sometimes they do).
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#64Earlier quoted context omitted.
That is not necessarily a sign of a good language, though. ADD 1 TO COBOL GIVING COBOL is also readable, and yet (thankfully!) we've mostly abandoned COBOL. And no, I'm not saying Python is bad, or like COBOL - just that readability and quality of a language are not necessarily related.
I don't think that "englishy" (COBOL, applescript) code is readable, and I bet many programmers agree. Python is readable because its syntax is very close to many people's version of pseudocode. This is why non-Python programmers find it easy to read.
Or at least that is what Python developers seem to believe
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#65Earlier quoted context omitted.
People shouldn't make claims like that honestly. It makes be discount the language almost immediately because I know I can't really trust what's written about it on its site. Furthermore, there's tons and tons of parallel C code. Probably more than any other language. Almost any decent C library is reentrant. Many of major C projects (mostly thinking of server software and operating system kernels) are threaded.
Hell, many operating system's thread schedulers are written in C..
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#66Looks like a computationally executed VHDL. Interesting, but not necessarily useful. And looking how hard it is to "write" good vhdl logic, I'm not sure how many could handle coding in ANI.
always @(posedge clk) begin
b
You know how SW developers like the teaser of swapping words... This is how HW people do it (and of course, if you had used a regular assignment "=" instead of the non-blocking one "<=", the swap would fail).Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#67Faster than C – this is explained in the FAQ as most C programs being single threaded and ANI being inherently multithreaded. ANIC was posted to HN most of a year ago: http://news.ycombinator.com/item?id=1042122 with much commentary.
Sorry, I missed it at the time. BTW I wanted to avoid a double submit and I have been looking for some "search" box without success, it is probably obvious once you know where it is, where is it?
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#68Earlier quoted context omitted.
I'd argue that Python is very easy to read for someone new to programming, particularly someone familiar with mathematical notation. Something like: for animal in ['dog', 'cat', 'bear']: print animal strikes me as intuitive and obvious, both absolutely and also relative to the equivalents in other languages.
That is not necessarily a sign of a good language, though. ADD 1 TO COBOL GIVING COBOL is also readable, and yet (thankfully!) we've mostly abandoned COBOL. And no, I'm not saying Python is bad, or like COBOL - just that readability and quality of a language are not necessarily related.
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#69Earlier quoted context omitted.
The compiled binary result of an ANIC program can not run on Windows natively. Thus where on other systems my dependency list is simply the native binary, on Windows, Cygwin either needs to be packaged with the release or installed manually by the user. It's a blurry question regarding where you say a VM/Compatibility shim means that you no longer running the application natively. The same can be asked of Java, Flash…
What about .NET? By your logic, applications written for the .NET CLR don't support Windows (XP) either.
Re: Anic -- Faster than C, Safer than Java, Simpler than *sh
#70Earlier quoted context omitted.
I don't know... I kind of like it. It's different, especially where the '\' is concerned, but the syntax as a whole has one thing I really really really like: Much of the language doesn't use the shift-key, especially in the number-row. And where it does, it's frequently on easier-to-hit keys like ' Besides. You want ugly? Try K: http://en.wikipedia.org/wiki/K_(programming_language) . Or, heck, anything APL influence…
APL, k, and similar languages are terse . No need for loops, verbose variable/function names, etc. It's far more productive. Plus, since all actions are based on arrays, the compiler can very easily target vector processors (including SSE) and make cache-effecient memory allocations. And since the language is small, the interpreter is usually small enough to fit in L1 cache.