If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Crack Becomes Compelling For General Purpose Coding

Phoronix: Crack Becomes Compelling For General Purpose Coding

Version 0.7 of Crack, a general purpose scripting language aimed for high performance, has been released and it brings a number of new features and improvements. To its developers the Crack language is reaching a pay-off point as being an alternative to writing programs in Python, C++, or Java...

> Crack has been developed on Linux x86 and x86-64. It is highly questionable whether it will build under any other platform. Portability will play a bigger role in future versions of the language.

Portability should be a major feature for any runtime environment, moving it to "later" doesn' sound like a good idea. I also do not really understand why they introduce the ":=" assignment operator as in Pascal but then do not enforce it, allowing "=" for assignments. That way you still need "==" for comparisons, which makes the whole ":=" operator obsolete again. I have always hated having to search for misstakes like

Code:

if(a = 0)

in beginner's code which are perfectly legal because of the side-effects of the "=" operator.

> Crack has been developed on Linux x86 and x86-64. It is highly questionable whether it will build under any other platform. Portability will play a bigger role in future versions of the language.

Portability should be a major feature for any runtime environment, moving it to "later" doesn' sound like a good idea. I also do not really understand why they introduce the ":=" assignment operator as in Pascal but then do not enforce it, allowing "=" for assignments. That way you still need "==" for comparisons, which makes the whole ":=" operator obsolete again. I have always hated having to search for misstakes like

Code:

if(a = 0)

in beginner's code which are perfectly legal because of the side-effects of the "=" operator.

I'm sure, being a LLVM language, that portability won't be difficult to accomplish. What the developer probably means is that he only has time to focus on Linux ATM.
But I agree that assignments like "if (a = 0)" shouldn't be allowed in ANY language.

AWK

People forget about GNU awk; it's a very fast scripting language. I converted a bash script that had an execution time of 30 seconds to awk, and the new version executed in 0.1 seconds. It's also available on almost every platform. Even my dd-wrt router has GNU awk available.

> Crack has been developed on Linux x86 and x86-64. It is highly questionable whether it will build under any other platform. Portability will play a bigger role in future versions of the language.

Portability should be a major feature for any runtime environment, moving it to "later" doesn' sound like a good idea. I also do not really understand why they introduce the ":=" assignment operator as in Pascal but then do not enforce it, allowing "=" for assignments. That way you still need "==" for comparisons, which makes the whole ":=" operator obsolete again. I have always hated having to search for misstakes like

Code:

if(a = 0)

in beginner's code which are perfectly legal because of the side-effects of the "=" operator.

I can hardly see the use of a scripting language (other than bash and similar, which use is for being de facto standards on their platforms) which is not portable. Just make two builds if your language of choice will support only two outputs and provide compiled binaries.

I also do not really understand why they introduce the ":=" assignment operator as in Pascal but then do not enforce it, allowing "=" for assignments. That way you still need "==" for comparisons, which makes the whole ":=" operator obsolete again. I have always hated having to search for misstakes like

Code:

if(a = 0)

in beginner's code which are perfectly legal because of the side-effects of the "=" operator.

Because C is the descendant of Fortran/Algol68, not Pascal. While Algol68 used the := operator for assignment and = for equality, C followed the more familiar Fortran syntax, which used = for assignment and == for equality.