Forum Replies Created
-
AuthorPosts
-
VS Code is great, but the debugging support is limited which makes it useless for me. For C# and JS I got it to debug as expected but not so for any other language. That being said I like it far better than Atom and it contains some of the features which are only available for VS Enterprise or Professional.
The version I am using is the one from the christmas demo, just copied the ted2.exe and bin/ted2.exe.
Mark said somewhere that one could use ted1 also esp. because it has the debug buttons.
Well, one could use the same approach like in many functional programming languages where null is not a valid state for a variable if not stated explicitly.
e.g.
Monkey123456789Local a:MyClass = null ' Compile Error because null is not allowedLocal b:MyClass Option = None' OK, Option type can have no valueLocal v:MyClass Option = Some(new MyClass())' the operation 'a' might return nothing (None)'( Or use Maybe<T> / Either<T> / Just<T> / Neither intead of option)If a = null then ... ' Error "a" cannot be nullThis has two major benefits: It is very easy to eliminate unnecessary null checks (because null is not allowed) and it is also very easy to distinguish between a result that is null and a failed operation that returns nothing because null <> None.
Here is one of the many article on this matter : *click*
Talking about Ted2, the hotkey I am missing a lot is CTRL + D to duplicate a line.
Visual Studio also has the nice feature to copy the whole line when you press CTRL + C and nothing is selected.
I also showed monkey2 to someone and he disliked the fact that the [x] for closing documents does not stand out little more. It’s pretty much atom like but for a person not used to might be worth making it a little more visible. It is also not noticable which file is currently opened which could become a little confusing when the project grows larger.
Well, for local variables it should be a compile error but for fields this is indeed absolutely unexpected.
Monkey1234Function Main:Void()Local a:Fooa.Hello()EndThe Variable is ‘clearly’ not initialized. The C# way of throwing a compile error because you try to call a method on a non initialized variable would be more reasonable to me.
-
AuthorPosts