That is a somewhat daunting message for a beginner like me.
Thus now i wish :
* either a correction that solves my case (happy)
* or an acknowledgement that ML typing is sadly not strictly lesser than the shen one
Regards,
- damien
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/f519531a-5dce-4eef-b65c-fdeb16247449n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Shen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qilang/O1yo_3WRUUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/2c482344-9444-4154-b3ac-9553f9d5f9bbn%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Shen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qilang/O1yo_3WRUUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/9a792e68-c1c1-4317-a28e-689620b19368n%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/CAGp%3DqtS5hf3doP%2BM6ia5NwQpCyeizj7Jn4VDpWX%2BxC1miDckow%40mail.gmail.com.
The "billion dollar mistake" in C is much worse because the type system there doesn't distinguish from (? A) and A; plus a pointer can become null at any time, or be cast from an integer, or the arithmetic can overflow etc.
--
You received this message because you are subscribed to a topic in the Google Groups "Shen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qilang/O1yo_3WRUUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/61b4c29f-fc33-468a-8c08-19b3d6d61f89n%40googlegroups.com.
I haven't found the non-termination to be a practical issue at all really, especially when developing interactively with a REPL. It isn't much worse than saying computer programs don't work because you can never really be sure if they will halt.
Someone also claimed earlier that Prolog doesn't scale for type checking. The scaling is on a per function basis, so I would imagine most human written functions to be nowhere near big enough to cause a speed issue.
I tested a 1000 line nested version of the below function and it loaded and typechecked in 8.625 secs with 2,130,042 inferences. This was in a long running REPL session with a 11795 command backlog and plenty of type rules declared.
(define slow
{ number --> number }
X -> (let X (lambda X X)
(let X (lambda X X)
(let X (lambda X X)
(let X (lambda X X)
1)))))
I guess people occasionally see functions 17,000 lines long in imperative languages, but that must be very rare in a functional programming language with pattern matching.
Also, things like the principle type property don't seem to matter much in practice, and I would not want to sacrifice any features for it. Demanding that the user annotate their toplevel functions with a type signature isn't a large burden, and it is often recommended for documentation purposes anyway. Maybe principle types may have a positive effect on development speed (and probably error messages), but it is hard to say.
The best criticism against Shen's type system is that error messages are bad and trace debugging with spy is slow and tedious. The debugger in SWI prolog is much better, and something like that could probably replace what we have now.On Tuesday, December 14, 2021 at 4:56:14 PM UTC alpha...@orange.fr wrote:
I must say i am really impressed.
It took many years by an army of ocaml researchers/programmers to tackle nested datatypes and generalized algebraic datatypes. That makes improbable that one person can go the sequent calculus way and succeed in a lifetime.
In Functional Programming forums ocaml/coq people say Shen is inadequate because typing eventually does not terminate. I disagree.
My current personal project is writing a CC-BY-SA ocaml book.
Thus i am rather ocaml oriented at the moment.
My next personal project is writing an Interactive Fiction authoring tool for text adventures.
I will then seriously consider Shen as a programming language.
Anyway, what is the benefit of type checking the generated yacc code? Seems better to type check closer to the input source for performance and user experience reasons (stepping through compiler boilerplate with 'spy' sucks).
--
You received this message because you are subscribed to a topic in the Google Groups "Shen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qilang/O1yo_3WRUUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/70dd1b0a-6063-4eb8-809b-bec0f15b1872n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/8f75e9cd-e057-4304-be24-2a1a51b66f9cn%40googlegroups.com.
Btw, why can't you change the yacc type system to something like this:
(defcc <b>
{ (list symbol) --> (yacc number) }
hi := 1;)
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/86df242d-67b9-4ee2-90d1-1ba1f414cef9n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Shen" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qilang/O1yo_3WRUUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qilang+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/qilang/c40fa6a7-eb8e-4244-a39f-601209a04357n%40googlegroups.com.