Re: mutter tiling



    develop to hedge against this very eventuality. They're called unit
    tests. This is probably a textbook example for why unit tests are
    important, especially in a dynamic language environment.

Of course unit tests are important. But, it's annoying, and certainly
less that optimal, to have to write unit tests to check for errors that
a type system handles naturally. And, then you *still* end up having to
a ton of runtime checking of types in your code, which can easily turn
into a mess.

just to make it explicit: unit test are good for other things beside checking for type errors. Next: since ages i fail to understand java programmers obsessions with type safety and exception handling :-) I don't want to come across as a hippie, but: let the errors happen ....... and then fix them :-) Cluttering your code is your decision.

    Now the Bad News: there's no existing unit test infrastructure in
    gnome-shell javascript land. We need it, badly. And the Good News:
    there's lots of great frameworks out there for this for both the
    browser (qunit, screw-unit, jspec, etc) and server-side (vows, jspec
    again, etc) environments that we, as a community, can leverage to this
    end. This is something that's been on my mind quite a bit, lately.


Java has some of the best unit testing infrastructure around.

Okay, it's about on par with most of the others, e.g. ruby, python, c#, javascript, so what.

    I hope you're joking, because I don't even know where to begin with
    this. Java is definitely a step backwards, here.


Uh... at the risk of causing more ranting, would you care to elaborate here?

I agree, elaboration is always good.

Note that I'm not at all proposing some kind of mandate or official
blessing at all. I was simply mentioning the possibility of writing
extension code (thanks to the fact that the impl language is
javascript), in a language with strong type safety, tons of tooling,
perhaps more developers world-wide than any other, and a large, awesome
open-source community. Also, I don't think you should assume that people
don't know javascript just because they would prefer using a type-safe
language...

just for the record, java is not considered type-safe. There is multiple classifications. Type-safe vs. type-unsafe, strong vs. weak typed, dynamic vs. static typed.

safe vs. unsafe: type spoofing, undefined consequences of operations
strong vs. weak: type can be changed (or is polymorphic)
dynamic vs. static: explicit declaration of type

of course there is some overlap between these categories. Just from the back of my head:

javascript: unsafe, weak, dynamic.
java: unsafe, strong, static.
for comparison ruby (and python): safe, strong, dynamic.

eTM


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]