3 ms·
Wasabi is statically typed — `dynamic` wasn't added to C# until C# 4, in 2010, so the implementation choice was between static types and a LOT of reflection. T
by krallja 11y ago
Wasabi is statically typed — `dynamic` wasn't added to C# until C# 4, in 2010, so the implementation choice was between static types and a LOT of reflection.
The type inferencer was an attempt to make it as easy to declare variables and functions as it was in VBScript. Of course, you could explicitly declare types as well.
The one place Wasabi depends on Hungarian notation as a type heuristic is when reading from an ADO RecordSet (which happens quite frequently in FogBugz). The column name determines which type the returned object will be cast into.
- mwcampbell 11y agoHow much of the FogBugz code had to be modified to accommodate static typing, even with global type inference? In other words, was there much code that truly depended on dynamic typing? My guess is that Joel and his team were more disciplined about this than I've been. (Yes, I'm entertaining the idea of writing a custom compiler from a dynamically typed language, in my case Lua, to a statically typed one, probably C++ with heavy use of reference counting.)
- krallja 11y agoVery little, if I remember correctly. The FogBugz coding conventions meticulously follow Apps Hungarian (http://www.joelonsoftware.com/articles/Wrong.html http://www.joelonsoftware.com/articles/Wrong.html), which means that the type of a variable should not change.