Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

- Visual Studio project files are XML files that are interpreted line by line, and can contain variables, branches, and loops. Hell on earth.


They are badly copied Ant build files.

Ant came first, then when Microsoft redid the VS project format, they created MSBuild.

As incredible as it may sound, Ant is still easier to deal with than MSBuild.


Ant did not include IF THEN ELSE, unless you added the contrib package.

If you understood the paradigm, you could write branches in Ant files simply using properties and guards on properties ("unless"). Using IF in Ant was basically admission of not having understood Ant.

This said, I used Ant for a very limited amount of time.


It sure did, you use conditions, no need for contrib.

https://ant.apache.org/manual/Tasks/condition.html

The else part is easily done by repeating and negating the condition.

Two other advantages of Ant that MSBuild lacks in a sane way to this day, are macros, and proper documentation.


As of Ant 1.9.1, you can use 'if' and 'unless' attributes on any task or element in a target. I stopped using Ant a long time ago, but this was a pleasant discovery when I had to pick up an old Ant based project recently.

https://ant.apache.org/manual/ifunless.html


I agree, that is what I meant: there were people who installed Contrib to have <if> element, but in reality you did not need that you could just use Ant's built-in features like you said. In my opinion installing Contrib to use <if> was a demonstration of not having understood how Ant works.


Nice, I was basing my answer on what was there initially.

I always liked Ant, as I don't suffer from XML allergy.


The legacy version of MSBuild was really bad, but the modern MSBuild project files for .NET are actually quite concise and clean by default?


Only if you are happy with defaults and don't require any build logic.

Also you forgot MSBuild is used for everything, not only .NET.


For new .NET SDK style projects you hardly ever need to customize the defaults and I know it's used for more stuff than .NET, but I just wanted to give an example where it actually doesn't suck. Also, you may not need to do everything in MSBuild, for some more complex stuff, you can use something like Cake (https://cakebuild.net/) in .NET for example and skip the programming in XML.


.NET made into my toolbox before it was announced to the world, thanks to be working at a MSFT partner that was selected to be part of the Portuguese launch event for .NET with ready made products.

Never seen any big corp using alternative .NET build tools, rather wrestling MSBuild, or before it came to be, nmake.


Horrible. Would’ve been much nicer if they’d reached for Scheme.


You say that, but people in OCaml keep bemoaning the use of mostly declarative s-expressions in the Dune build system. Imagine the reaction if MSBuild used an actual Scheme.


Why doesn't the OCaml build system use OCaml?


You don’t want a language with non-determinism, arbitrary IO, impure functions etc. for build configuration ideally.

I guess the answer to your question is OCaml has unmanaged side effects.


They don’t know how good they really have it :)


what's even worse that schema uses extremely generic types with attributes denoting actual type.

Makes reading it even harder, and any possible constraints due to type safety go out of the window, so we get worst of both worlds.


Wesnoth the game also has that via WML. Looks very ugly and obfuscated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: