3 ms·
> Without static typing, the discoverability is so low so that you're literally feeling pain tinkering with python. > REPL experience with static types is so mu
by socialdemocrat 7y ago
> Without static typing, the discoverability is so low so that you're literally feeling pain tinkering with python.
> REPL experience with static types is so much better. With numpy and scipy, I had to stick to documentation all the time even to do the most trivial things.
> What kinds of arguments could I pass to the plotting function? Read the docs. Does this work with dense or sparse matrix? Does it work with array? Read the docs.
I don't think that has anything to do with static vs dynamic typing. I can do all of that in Julia which is a dynamically typed language.
1) I can start typing a function name and hit tab to complete it, or show matching alternatives with possible argument combinations and their types listed.
2) As I start typing arguments I can hit tab more times to see matching completions. The REPL will take into account the type of arguments I've already given when offering possible completion alternatives.
3) If I got a type, which I am not sure what I can do with I can write methodswith(sometype) to get a list of all functions taking an argument of type sometype.
4) Wonder if something works with dense, sparse, arrays etc? Check the function signature. Usually it will say AbstractArray and sparse matrix and dense matrix are subtypes of AbstractArrays. Not sure, you can quickly check that on the REPL by asking AbstractSparseArray <: AbstractArray, or you just look at subtypes of AbstractArray with subtypes(AbstractArray).
Having said that I might want to check out Owl in the future. I have had a number of temporary engagements with statically typed functional languages. Haskell was interesting, but I found it to be impractical and too much of a time investment. OCaml may be more pragmatic, but it has often seemed a bit verbose to me.
- 6thaccount2 7y agoYea as someone with a little Julia experience looking at this, OCaml just seems to have a lot of boilerplate in weird areas. The first thing I do when evaluating languages for myself is to look at processing text files line by line or all at once and splitting strings. If that is complicated, then the language might not be well suited to my needs. With types, a repl, native support for scientific computing and sparse matrices, LLVM JIT, LLVM assembly code inspector, all kinds of macros and support for macros, s-expression macro inspector, speed, easy package manager, large community, good graphics packages...etc, I'm really liking Julia.