|
Acorn is really fast. Just like Esprima. Acorn is tiny. About half as big as Esprima, in lines of code. Still, there's no good reason for Acorn to exist. Esprima is an excellent project, well-documented, and small enough for any practical use. It exposes an interface very similar to Acorn. The only reason I wrote Acorn is that small, well-defined systems are so much fun to work with, and that Esprima's web page very triumphantly declared it was faster than parse_js, the implementation in UglifyJS version 1, which is a port of my own parse-js Common Lisp library. I just had to see if I could do better. Why did he code it? Because the challenge was there...
|
|
|
|
|
TypeScript is a superset of JavaScript and you write it like you write JavaScript which I like. Any existing JavaScript is already TypeScript. One argument has been made that TypeScript is for people who don't want to learn JavaScript. I don't buy that. As Ward Bell said in an email: TypeScript is not a crutch any more than JSLint is a crutch. It doesn’t hide JavaScript (as CoffeeScript tends to do). - Ward Bell. I think Ward says it well. Folks rail against static typing but they don't complain about JSLint. TypeScript offers optional type annotations - it's hardly a perversion of JavaScript. TypeScript has been out a day. It's way early to see if it has legs.
|
|
|
|
|
Saying the TypeScript is for people that don't want to learn Java is like saying we should still be programming with Basic.
|
|
|
|
|
Dunno about the rest of you, but my favorite fix for JavaScript is Javathcript[^]. Lisp in the browser is what every real geek dreams of:
<script type="text/lisp">
(let*
( (button (getElement "btn"))
(nameField (getElement "name"))
(clickHandler (lambda () (alert (concat "Hello " (get nameField "value"))))) )
(set button "onclick" (export clickHandler))
)
</script>
|
|
|
|
|
\o/ come at me bro!
|
|
|
|
|
It’s been known for some time that Anders Hejlsberg was doing something interesting in the JavaScript space, and when Anders is doing something interesting, it’s worth paying attention. This is, after all, the man who got Real Programmers to use Pascal, and pulled off C++++ (put two of the +’s over the other two: #! See what they did there?). Today the covers were taken off the latest project by the man himself, and it’s TypeScript: “a strict superset of JavaScript that compiles to plain JavaScript”. The good, the bad and the wishlist.
|
|
|
|
|
Would be great to have something better than JavaScript, yet has compatibility. Maybe some day will not need to have JavaScript in the middle.
|
|
|
|
|
And Douglas Crockford sayeth: https://plus.google.com/118095276221607585885/posts/MgzNUSTwjRt[^]
Quote: Microsoft's TypeScript may be the best of the many JavaScript front ends. It seems to generate the most attractive code. And I think it should take pressure off of the ECMAScript Standard for new features like type declarations and classes. Anders has shown that these can be provided nicely by a preprocessor, so there is no need to change the underlying language.
I think that JavaScript's loose typing is one of its best features and that type checking is way overrated. TypeScript adds sweetness, but at a price. It is not a price I am willing to pay.
PS: the comments on Crockford's G+ thread are fantastic. Lots of interesting insight.
Director of Content Development, The Code Project
modified 2-Oct-12 22:52pm.
|
|
|
|
|
OK, so why do I think JavaScript sucks? Well first off, as an enterprise web application developer, I don't like any scripting or dynamic languages. I like code that compiles for lots of obvious reasons. It is messy to code with and lacks all kinds of modern programming features. We spend a lot of time trying to hack it to do things it was never really designed for. Ever try to use different jQuery based plugins that require conflicting jQuery versions? Yeah, that sucks. Maybe we should all go back to FORTRAN...
|
|
|
|
|
I have to agree that JavaScript sucks. I think there is still a place for inline code, but JavaScript does not play nice in HTML. It also is a very different language than what Web programmers tend to program in, which is Java or C#. It is also true that JavaScript was not designed for what it is used for. I do not think that it not being a complied language is neccessarily bad. In fact it might be good since do not have to worry about the platform, and the executed code is human readable. What would be much better is being able to organize the code as one does in C# and Java where classes are put into files, and objects are supported (which both C# and Java developers are familiar with). This could be managed by the development environment packaging the code in the web page when deployed, or having it included when sent to the client.
Read article about TypeScript, and it sounds really good.
|
|
|
|
|
With Java SE 8, Oracle will not have Project Jigsaw's modularity capabilities, which will be postponed until Java SE 9. Java Development Kit 8, though, which would be based on Java SE 8, will feature Project Nashorn capabilities for JavaScript programming. "This is a modern implementation of JavaScript that runs on the JVM," said Georges Saab, Oracle vice president of development. Cloud features have been postponed, but that's just a passing fad anyway, right?
|
|
|
|
|
Information has come forward to Windows Phone Central that demonstrates Microsoft does have their own Windows Phone hardware in the works; in fact, we’ve heard it already exists and is in testing. The source(s) are known to us and not anonymous, though for obvious reasons we must keep them off the record. Details about what it looks like, hardware specifications, launch times, etc. have not been shared with us by the person(s) who have provided the information. The only thing we do know is when compared to current WP8 hardware it’s something unique. What could Microsoft do to make a "unique" smartphone?
|
|
|
|
|
To celebrate this milestone guide, we asked the leaders in computer science to share their thoughts about The C Programming Language. Read on to discover what Bjarne Stroustrup, David Patterson, Andy Tanenbaum, and many others have to say. One of the most important books ever published in computer science?
|
|
|
|
|
Yeah, in concert with "The Art of Computer Programming" by Donald Knuth, these two are definitely in A-list.
|
|
|
|
|
The algorithm for merge sort is based on the idea that it’s easier to merge two already sorted lists than it is to deal with a single unsorted list. To that end, merge sort starts by creating n number of one item lists where n is the total number of items in the original list to sort. Then, the algorithm proceeds to combine these one item lists back into a single sorted list. The merging of two lists that are already sorted is a pretty straightforward algorithm. Here's how it works.
|
|
|
|
|
A few weeks ago Microsoft silently launched a new home page. It was meant to be a temporary launch for the purposes of some preliminary testing. But as fate would have it, it became the talk of the Internet. Twitter was abuzz with opinions. Several blogs and online news sites, including The Verge, wrote about it. And, the reviews were overwhelmingly positive. The new Microsoft.com home page is designed with a multi-device future in mind.
|
|
|
|
|
|
That is for Indonesia. When you believe what you read, make sure you know what you are reading.
Worldwide the picture is VERY different.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Quote: That is for Indonesia. He says that specifically in the article. In fact, that is what the article is about!
Quote: make sure you know what you are reading ...precisely!
- Life in the fast lane is only fun if you live in a country with no speed limits.
- Of all the things I have lost, it is my mind that I miss the most.
- I vaguely remember having a good memory...
|
|
|
|
|
I was just trying to make sure that was clear to CodeProject users that didn't click on the link and read the article. It floored me when I read that and was wondering in what context that is true.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: Worldwide the picture is VERY different.
Might want to try reading the article more closely...the point was that it can vary greatly from place to place, and that you should know the statistics of your target audience.
|
|
|
|
|
Might want to not read so closely...
How about I say it this way?
The picture is VERY different from place to place worldwide.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: How about I say it this way?
The picture is VERY different from place to place worldwide.
Again, that's exactly what the article is saying.
|
|
|
|
|
Exactly. The article talks about statistics.
Wonde Tadesse
|
|
|
|
|