by diego_moita · 10y ago · 0 comments
In the .Net/VisualStudio world, the language tooling (Intelisense, visual drawing XAML & WinForms, etc) became as important as the language semantics or the availability of frameworks and documentation.
A long ago there was a fad, known as CASE (Computer Aided Software Engineering) that advocated doing on programming what CAD did to other engineering. It seems that were finally getting there.
Consulting has me moving jobs a lot and I encounter a veritable kaleidoscope of crappy work. Being able to correct minor issues in scope without restarting, while ten form posts deep in an archaic webforms app with dodgy "we-didnt-know-so-we-rolled-our-own" state management has been a lifesaver. Thank you nineties VB team, it's because of you that I'm not rocking back-and-forth in a padded cell making animal noises today.
In Eclipse (for example) you just start typing code, (none of this silly locking the IDE while debugging stuff), and the debugger will update the running program instantly. With jRebel you can even change things structurally without restarting.
Oh how I would love an actually working hot swap feature for .Net.
I'm not sure about other languages, but with Erlang's hot loading (plus the sync[1] project) I find that aspect to be nearly as good as E&C in Visual Studio.
While it's not quite at the level of 'stop the code from executing, changing something, continue', it's close enough for practical usage - save a file, the underlying module is more-or-less instantly recompiled and loaded.
Delphi was much better.
In the end, I found it hard to do maintenable code for complex applications. And it was not specifically because of the IDE but more because of the way you have to organize the code.
But I did not spend more than some months on it so maybe I'm wrong.
If you had an large old Vb6 project build using MVP pattern you would be laughing.
Much like any other project in any other language.
Yes, you can write good or bad code in any language. But some languages have an endemic culture of not caring about good code. IME, VB is one of them, as is PHP.All the VB6 code I've seen has been a random mashup of databinding directly to the and click handling. The tools encouraged this approach.
That is what I was doing on Windows 3.x and have done while coding in Mac OS X and Windows.
Also the reason I never quite adapted to UNIX mentally of VI/Emacs.
Even though I have spent enough years coding for UNIX that me and Emacs are quite old acquainted with each other.
I know the essential for when Emacs isn't available which is quite common on commercial UNIX installations, learned back when Xenix was still being sold and don't intend to learn more than that.
Thanks anyway, I know you had good intentions.
I can write server-side C# in vim (without omnisharp) just fine, actually.
Maybe the tools became "indispensable" because they add value? I refactor my code in vim but it would probably be faster in VSCode. That doesn't make C# a bad language.
The var keyword was the first time it was even possible to write C# without tooling. It has definitely made it possible for me to use Vim for editing C# code. Newer features, such as lambda expressions, and some of the much nicer property syntax makes me feel that it may actually be fun to write C# from scratch without Visuak Studio looking over it.
I always thought of C# as the improved, less verbous Java. I wouldn't compare it with Python or other dynamic languages, but I prefer it to most compiled languages (especially at the times it was created)
public static IList<Ephraimite> FindEphraimitesToKill(IList<Ephraimite> ephraimites)
{
IList<Ephraimite> ephraimitesToKill = new List<Ephraimite>();
foreach (Ephraimite ephraimite in ephraimites)
{
if (ephraimite.Speak("shibboleth") == "sibboleth")
{
ephraimitesToKill.Add(ephraimite);
}
}
return ephraimitesToKill;
}
Now, the same in (imperative-style) OCaml: let findEphraimitesToKill ephraimites =
let ephraimitesToKill = ref [] in
List.iter (fun (ephraimite) -> begin
if speak(ephraimite, "shibboleth") = "sibboleth" then
ephraimitesToKill := !ephraimitesToKill @ [ephraimite]
end) ephraimites ;
ephraimitesToKill;;
See how much less we had to specify the type of what we're handling here? And things would have gotten easier if we used functional-style OCaml, but that's not entirely a fair comparison.So hypothetically it should be possible to write a C# compiler that would, if type annotations were omitted in some places, be confident enough to assign a sensible default, which is why we call the current version verbose. Although I suppose it's slightly more complicated than that. (Interfaces, if we want to have them, need to be explicitly declared as there are potentially many interfaces that could be used for a given object, and the rigidity imposed by redundant type declarations could help with the health of large and long-lived codebases.)
Intellisense has become it's own lightweight thing and consumable from more tools, you can code just fine without it. ReSharper I've never used, I find it gets in my face more than it helps.
If you want to see a tooling based approach, go look at the state of android development these days. That's why we see stuff like react native becoming popular.
Then again, you don't have to always go for the most elegant/compact thing, either.