Re:CIL (.NET bytecode) to WebAssembly compiler
by moron4hire on Thursday September 03, 2015 @04:46PM
(#10167435)
Naming conventions are a great way to end up with liar-code--code that isn't what it calls itself. Coercing user input into expected types is a good way to get exploits. Testing parameters explicitly is just asking for someone to forget a particular parameter, and just returning null instead of an error is how we end up with black-box functions that nobody can figure out why they get called in different places because they don't seem to have any particular use. WSDL is a different issue entirely; now you're talking about RPC (of which WSDL is just one format that .NET supports), which is not the same thing as reflection.
The things you're talking about doing, they are bad software design.
For that matter, you can use an object stream, and pipe it all through to resolution. If your data comes from variant sources (spreadsheets, dirty xml, etc) then you are way better off with a scripted language.
Try importing a WSDL that defines various interfaces to use "Object" and VS/.Net chokes on it.
As far as users go, without the hard enforcements you can coerce values into either what you expect or cleanly drop out... unlike .Net where you have to go through the Try versions of convert, on who knows how many types in order to get something resembling predictable values... that doesn't even include regular expression syntax as a first class concept in JS.
I've handled dynamic input sources from both .Net (VB.Net and C#) and I'll tell you that most of the time JS/Node is simply easier... I've replaced complex importers written in .Net with straight forward, easy to reason with JS importers that run in Node, and edit/run/deploy without a compile step.
I will say that I do like that VB.Net has XML literals which can be very useful... but now that JSON is getting to be more common JS is less of a disconnect.