﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Steve Wagner commented on I like strong typing and compilation errors</title><description>There is also an alternative to script# with name DotWeb. 
  
  
[http://github.com/flaub/DotWeb](http://github.com/flaub/DotWeb)  
  
It transforms IL to Javascript instead of directly parsing C#.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment45</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment45</guid><pubDate>Mon, 10 May 2010 06:50:18 GMT</pubDate></item><item><title>Dhananjay Goyani commented on I like strong typing and compilation errors</title><description>&gt;&gt;&gt; Strong typing and compilation errors are implicit unit tests that you never have to write.
  
  
Must be eat, drink, sleep - tdd/ut guy. ;-)
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment44</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment44</guid><pubDate>Fri, 07 May 2010 05:03:42 GMT</pubDate></item><item><title>mahmud khaled commented on I like strong typing and compilation errors</title><description>you problem of finding the usage can be addressed by using javascript unit testing such as QUnit. Running the test suits can point to where the code is broken - just a thought.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment43</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment43</guid><pubDate>Thu, 06 May 2010 17:39:06 GMT</pubDate></item><item><title>Jason Y commented on I like strong typing and compilation errors</title><description>I, too, like static typing--a collection of _fast_ unit tests implemented automatically by the compiler.  To me, most of the benefits of dynamic typing are gradually disappearing with newer features of statically-typed languages (such as compile-time reflection).
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment42</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment42</guid><pubDate>Thu, 06 May 2010 16:54:05 GMT</pubDate></item><item><title>Tyler Burd commented on I like strong typing and compilation errors</title><description>I completely agree.  Sadly, my current position involves a good amount of PHP, and I have to maintain some very large legacy applications.  It is PAINFUL.  I miss good old resharper, compiler errors, castle transaction management, nhibernate, Rhino ESB, etc.  *sigh*
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment41</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment41</guid><pubDate>Thu, 06 May 2010 16:42:12 GMT</pubDate></item><item><title>Diogo Menezes commented on I like strong typing and compilation errors</title><description>Me too !
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment40</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment40</guid><pubDate>Thu, 06 May 2010 15:20:26 GMT</pubDate></item><item><title>Demis Bellot commented on I like strong typing and compilation errors</title><description>@Copenhas
  
  
&gt;&gt;I find it interesting that so many people mention IDEs. Is that the only reason C# is tolerable to people, because we have Visual Studio?
  
  
I believe 'elegance, productivity, performance and power' are c#'s main appeal. For most things I'm able to achieve a lot more in a lot less time and effort than with any other language or platform. Having good perf is a welcome bonus. 
  
  
Having a good feature-rich IDE that can complete your coding sentences definitely increases your productivity.
  
AFAIK C#/.NET is the only language that have added features primarily for being able to provide better support for IDE's and code-gen'ing, e.g. partial classes, partial methods, etc.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment39</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment39</guid><pubDate>Thu, 06 May 2010 13:34:27 GMT</pubDate></item><item><title>Jamiet commented on I like strong typing and compilation errors</title><description>I like strong typing and I cannot lie
  
All you other brothers can't deny
  
etc...
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment38</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment38</guid><pubDate>Thu, 06 May 2010 13:11:41 GMT</pubDate></item><item><title>Copenhas commented on I like strong typing and compilation errors</title><description>I find it interesting that so many people mention IDEs. Is that the only reason C# is tolerable to people, because we have Visual Studio?
  
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment37</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment37</guid><pubDate>Thu, 06 May 2010 12:36:13 GMT</pubDate></item><item><title>Ayende Rahien commented on I like strong typing and compilation errors</title><description>The interesting bit is that I am really fascinated by the number of people who assume that I have no clue about dynamic languages
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment36</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment36</guid><pubDate>Thu, 06 May 2010 10:18:46 GMT</pubDate></item><item><title>Ray commented on I like strong typing and compilation errors</title><description>Daniel,
  
  
In statically typed languages there is no need to always have 100% code coverage. In dynamically typed there is such a need.
  
  
For statically typed (modern like C# or Java) IDE will catch for you most of stupid mistakes instantly, in dynamically typed you MUST run ALL the code to be sure it's working.
  
  
Huge difference in my book.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment35</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment35</guid><pubDate>Thu, 06 May 2010 06:02:05 GMT</pubDate></item><item><title>Brian Takita commented on I like strong typing and compilation errors</title><description>I find you can get that quick iterative development using TDD, except TDD is even more powerful than static compilation, since you use the runtime to do your bidding.
  
  
I recommend using a good spec framework, such as Jasmine (
[http://github.com/pivotal/jasmine](http://github.com/pivotal/jasmine)), JSpec (
[http://github.com/visionmedia/jspec](http://github.com/visionmedia/jspec)), or Screw Unit (
[http://github.com/pivotal/screw-unit](http://github.com/pivotal/screw-unit)).
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment34</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment34</guid><pubDate>Thu, 06 May 2010 05:29:27 GMT</pubDate></item><item><title>blackdog commented on I like strong typing and compilation errors</title><description>Try haXe for a fantastic javascript like language, with strong/inferred typing, generics and other goodies which compiles to Javascript for client and server (node.js using type signatures you can find here 
[http://github.com/blackdog66/](http://github.com/blackdog66/) ). haXe also compiles to PHP, Flash and C++.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment33</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment33</guid><pubDate>Thu, 06 May 2010 03:33:43 GMT</pubDate></item><item><title>Joseph Gutierrez commented on I like strong typing and compilation errors</title><description>@ayende,
  
  
Even with unit tests instead of just failing at the template object. You would have failed in the consumer objects of the template object also. This would act like a type safety compiler.
  
  
This would be a similar issue if you were returning mock objects. Then it would require you to use an integration test to make sure that the template object was dealt with correctly in all the consumers.
  
  
As a metaphor I've been using 'operational programming...boring shit to combat training' MATRIX.
  
  
I've actually been running into this working on  a Legacy PHP Application.
  
  
But dammit JavaScript has closures this should be a non-issue.
  
  
I need to spend  some time thinking about this. Maybe I need to think about how this problem be resolved in Common Lisp or an event driven system.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment32</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment32</guid><pubDate>Thu, 06 May 2010 02:57:11 GMT</pubDate></item><item><title>Daniel Dotsenko commented on I like strong typing and compilation errors</title><description>Type safety is false safety. The only safety you can have is achieved through unit tests, which you would do in both, static and dynamic code. This is the only thing that protects sanity and business logic in your code. This is the only thing that allows your code to be maintainable and expandable by other people.
  
  
Tooling and unit-tests make any platform / language equally tolerable. My personal thing: Despite coding on a C# project in VS.Net08, I always open JS files in NetBeans. It picks up all unused variables (which means, i know where i misspelled a var), makes even "manual" refactoring JS a breeze with automatic highlight of the used var and has a solid IntelliSense-like and syntax-checking systems. 
  
  
If there would not be good tools for working with C#, the voices of people pissed at static typing languages would easily overshadow the static aficionados cause remembering all the dressing for the code (type names, variations in methods etc) is insurmountably painful. Thankfully good tooling for JS exists, just like it must have existed to make static side of .Net a viable dev platform. You are complaining just because you did not bother to find tools.
  
  
The subject of "safety" fallacy and tooling deficiencies aside, there is a qualitative chasm in mentality between dynamic and static language aficionados. That's the only true, and very divisive difference.
  
  
Although Python, JavaScript and C# are essentially the same languages and I get them all, I'd rather chew sand then roam and fight the similar-but-ever-different cloud of .Net classes. The thought of subclassing from an Dictionary to have another custom object so I could have a method i would get for free in one-and-only standard Dictionary type in Python is dreadful. 
  
Doing the Reflection dance so that i can iterate over properties of an object is dreadful. Knowing that Reflection exists is a criminal waste of a mind. Knowing that for all objects in JavaScript obj.method() = obj["method"]() singlehandedly justifies JavaScript's existence and superiority over anything statically-typed.
  
  
I understand and empathize with your pain, just because I harbor a similar pain. Yours is against dynamic typing. Mine is against static typing. The trick is to understand that it's not the poor language's fault. The problem is only in your head and is due to your habits.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment31</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment31</guid><pubDate>Thu, 06 May 2010 02:22:11 GMT</pubDate></item><item><title>Demis Bellot commented on I like strong typing and compilation errors</title><description>@tarn
  
  
That's not my experience, I find writing unit tests in C# to be a lot faster and require less effort than in JavaScript. It definitely helps if you naturally write testable code - typically this just means to use an IOC or other form of dependency injection. Using a mocking library like Moq makes Mocking and testing a non-event. 
  
  
NUnit tests also have the advantage of being supported and runnable within the IDE as well as external automated build tools and CI servers like Team City.
  
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment30</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment30</guid><pubDate>Thu, 06 May 2010 02:12:19 GMT</pubDate></item><item><title>tarn commented on I like strong typing and compilation errors</title><description>Like all dynamic languages you only get both the advantages of dynamic typing and refactoring safety if you unit-test your code. 
  
  
Writing unit-testable code and actually writing the unit-tests is generally a lot easier in dynamic languages. It is quite an effort to write decoupled code in a statically typed language so that it can be unit tested. Then you often end-up leaning on a mocking framework which is typically using reflection, emitting IL and casting-up types internally anyway!
  
  
I'm not saying I can write good, unit-tested Javascript and feel comfortable when refactoring it. But I put that down to me not having yet developed the skills and discipline, and not a particular language type system. These are skills and disciplines I want to learn because I like programming in dynamic languages including Javascript.
  
  
@Gian Marco Gherardi: Many people use Javascript on the server where there are plenty of alternatives. See Mozilla Rhino, V8, node.js and MongoDB.
  
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment29</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment29</guid><pubDate>Thu, 06 May 2010 00:48:28 GMT</pubDate></item><item><title>Chris commented on I like strong typing and compilation errors</title><description>Someone once said (and I forget who) that the compiler is just a glorified spell checker. I think I would agree
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment28</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment28</guid><pubDate>Wed, 05 May 2010 23:57:06 GMT</pubDate></item><item><title>Gian Marco Gherardi commented on I like strong typing and compilation errors</title><description>IMHO Nobody would use Javascript if there was an alternative. But there isn't still a real alternative
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment27</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment27</guid><pubDate>Wed, 05 May 2010 21:33:35 GMT</pubDate></item><item><title>Demis Bellot commented on I like strong typing and compilation errors</title><description>@Tom de Koning
  
  
Well this is proving to be quite an informative thread, had no idea there were better JS IDE's than VS.NET - it does get really slow at times for large code bases that I wish I could just turn it off. I guessed Jet Brains owns this space but I figured all their best efforts was only starting now and being put into 'WebStorm' (is that the best to go with in the future?), had no idea IntelliJ had killer JS support. I noticed others have recommended ScriptSharp here as well, which also looks worthy of consideration. 
  
  
I'm interested to know what other Ajax frameworks / tooling you recommend? Do you use FireBug, WebDeveloper toolbar, etc. What's your preferred browser to develop with? What unit test framework do you use? Is there other libraries Ajax devs should know about? 
  
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment26</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment26</guid><pubDate>Wed, 05 May 2010 19:50:16 GMT</pubDate></item><item><title>Tom de Koning commented on I like strong typing and compilation errors</title><description>I think this whole issue is mainly due to a poorly chosen JavaScript Editor. We have just completed a very complex UI in JavaScript and jQuery and this would not have been possible using VS2008 / VS2010. The intellisense is just not on a workable level.
  
  
If you use IntelliJ however, you get full intellisense for javascript AND all of the refactorings. Coding JavaScript in anything else is just plain silly.
  
  
Next to that, read JavaScript the good parts and leave all the parts out. 
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment25</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment25</guid><pubDate>Wed, 05 May 2010 19:24:25 GMT</pubDate></item><item><title>Ayende Rahien commented on I like strong typing and compilation errors</title><description>Joseph,
  
getDocument is a low level API call, it is being used in a lot of places. The issue is that I needed to change it output, which naturally propagate out.
  
In a strongly typed language, I would get immediate type mismatch errors, with JS, I had to do text searches
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment24</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment24</guid><pubDate>Wed, 05 May 2010 19:23:58 GMT</pubDate></item><item><title>Joseph Gutierrez commented on I like strong typing and compilation errors</title><description>I think my point was that you shouldn't have multiple callers. getDocument should be making the calls. it knows what it needs.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment23</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment23</guid><pubDate>Wed, 05 May 2010 19:16:40 GMT</pubDate></item><item><title>Demis Bellot commented on I like strong typing and compilation errors</title><description>@Jim Deville
  
  
They're are a number of reasons why its hard to provide rich intelli-sense support for JavaScript:
  
- You can't validate type errors since it is legal for a variable to change types in the language. 
  
- JavaScript has a problem where ';' are optional which hurts syntax checking since you're lexical parser needs to be liberally support different inputs. 
  
- arguments in functions are optional so it's hard to tell if you're using the method as it was intended or you've left an argument out.
  
- JavaScript has a concept of null, undefined, NaN, false which potentially mean different things in different contexts (e.g. when used as a bool all mean false). which one do you want the IDE to validate against? The existence of the '===' operator is a symptom of this.
  
- Can't see how you can reliably determine un-used variables/types without executing the program. JS lacks a compile-time definition of the identity/definition of your types/variables in your program as they are actually defined at runtime. So accessing and creating variables can only be determined when your program is actually run.
  
  
Don't get me wrong I still love the expressiveness and functional nature of JavaScript, but if it was so perfect google wouldn't have wasted their time building GWT which actually uses Java (one of the most painfully restrictive statically-typed languages there is) to generate JavaScript. One of the major technical advantages touted is to be able to use a mature IDE with rich re-factoring support:
  
[www.scribd.com/.../GWT-the-Technical-Advantage](http://www.scribd.com/doc/7679998/GWT-the-Technical-Advantage)  
  
Its no coincidence that a language as ubiquitous as JavaScript still lacks an IDE with good re-factoring support - this isn't an oversight, this is just *hard to do*.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment22</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment22</guid><pubDate>Wed, 05 May 2010 19:11:46 GMT</pubDate></item><item><title>Todd commented on I like strong typing and compilation errors</title><description>I feel your pain. While I really really enjoy C#, I hate Javascript programming. It is such a headache. I avoid it all costs.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment21</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment21</guid><pubDate>Wed, 05 May 2010 19:03:38 GMT</pubDate></item><item><title>Ayende Rahien commented on I like strong typing and compilation errors</title><description>Ken,
  
The problem is:
  
It is touched in some places.
  
I need to figure out WHERE I am touching it.
  
There are multiple callers for getDocument
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment20</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment20</guid><pubDate>Wed, 05 May 2010 18:55:19 GMT</pubDate></item><item><title>Ken Egozi commented on I like strong typing and compilation errors</title><description>@Ayende: if the value is passed untouched all the way, why would you care to change that? you only need to change where you create it (in the jQuery .ajax call) and the usage in the final func in the continuation. All the rest would just work, because of the dynamicism.
  
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment19</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment19</guid><pubDate>Wed, 05 May 2010 18:50:20 GMT</pubDate></item><item><title>Kyle Szklenski commented on I like strong typing and compilation errors</title><description>The arguments I've heard for using dynamic typing are typically quite weak. In reality, with strong typing, you don't only get a nice, strong IDE and compiler that can debug things for you - you also get a design that can be analyzed without taking into account all possible third party alterations, and a whole host of simplifying assumptions about the design.
  
  
One aspect that I was told of before was that being able to add your own methods to an object that has already been defined allows you to modify the object so that you can use it directly. But for the code that the person was building, those added methods would not be used (at all) by the framework in which he was working - which is the same as saying, "I'm tacking on my own stupid responsibilities onto this random object in the system because I'm too lazy to figure out how to add it correctly."
  
  
To be honest, a lot of this dynamic typing craze lately drives me pretty nuts. As a developer, having a dynamic language makes it much easier to hack a system that's already built, but at the same time leaves the dev with the least amount of useful information in exchange for some mediocre flexibility. I don't mind having it in the language just in case, but an entire language that's dynamically typed just makes me angry and sick to my stomach. Call me old-fashioned!
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment18</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment18</guid><pubDate>Wed, 05 May 2010 18:38:58 GMT</pubDate></item><item><title>Martinho Fernandes commented on I like strong typing and compilation errors</title><description>@Ray: That's not the same thing. What about this:
  
  
x = 1
  
x = "a"
  
  
y = x.ToLower()
  
  
Can't do that in C# if x is typed object. But you can do that in a dynamic-typed environment. Just change the type of x to dynamic and it works in C#.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment17</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment17</guid><pubDate>Wed, 05 May 2010 18:18:16 GMT</pubDate></item><item><title>Alexander Nyquist commented on I like strong typing and compilation errors</title><description>I have to agree with you all. This is getting really frustrating, especially when trying to refactor a large layer in PHP or any other dynamic typed languages.
</description><link>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment16</link><guid>http://ayende.com/4486/i-like-strong-typing-and-compilation-errors#comment16</guid><pubDate>Wed, 05 May 2010 18:10:13 GMT</pubDate></item></channel></rss>