Hacker News new | ask | show | jobs
by maxxxxx 2580 days ago
"It reminds me of AppleScript, but far worse."

I wouldn't go that far :-). But you are right. They did good work with the cmdlets but they put a terrible language on top of them.

It would have been much better if they had put an interpreted version of C# (maybe with a few extensions) on top of it.

1 comments

Agreed, I think F# which already has an interpreter would have been a great and obvious choice. Terse Syntax, amazing type inference, and a great existing community.
This may be interesting. Script languages generally aren’t typed but maybe a language with very good type inference may feel like it’s untyped.
You mostly don't need types in F#, although types often add readability, especially for function signatures (IMHO).

F# will even compile

    let add a b = a + b
    add 1 2;;
as

    val add : a:int -> b:int -> int
    val it : int = 3
or

    let add a b = a + b
    add 1ul 2ul;;
as

    val add : a:uint32 -> b:uint32 -> uint32
    val it : uint32 = 3u
So it will even infer type from the first usage of the function.