4 ms·
Thanks - OCaml looks interesting, and would be a little further from Ruby than Lisp because of its static typing, right? Any frameworks (or good libraries) for
by jon_dahl 18y ago
Thanks - OCaml looks interesting, and would be a little further from Ruby than Lisp because of its static typing, right?
Any frameworks (or good libraries) for web apps? I enjoy digging into languages on their own, but I also want to get things done, which is usually easier with decent libraries for data persistence and user interface.
- silentbicycle 18y agoSome type terminology: Statically typed: This variable will always hold a 16-bit int. vs. Dynamically typed: The value in this variable happens to be a 16-bit int right now. Strongly typed: This is a 16-bit int, nothing else. vs. Weakly typed: This is bits in memory, we could try using it as a number. (Things like: "the" * 3 probably result in "thethethe" or a crash, rather than a warning or error from the compiler/interpreter.) (Warning -- there are disagreements about subtleties in these definitions, much like what "Object-Oriented" actually means. I'm trying to summarize things enough to be useful here.) Lisp is strongly, dynamically typed by default, e.g., the value in a variable is definitely a specific type, but could be replaced with a completely different thing. The type is associated with the value, not its container. (You can declare something to be only a specific type for optimization, though, and some of the better compilers also try to infer types, I think.) C is strongly, statically typed, but the type system is full of holes, since you can recast anything as a void ptr and then something else. The type system is there for efficiency's sake, but it's easy to lie to, and it crashes hard if you aren't careful. OCaml doesn't let you do this; it also automatically infers the types of things based on their usage, and gives you an error when it's ambiguous. If you want to do something that could take an int or a string, you would use a union type, e.g. " type int_or_string = I of int | S of string " and handle either possibility. As for web apps, I don't have much experience there yet, sorry.
- richcollins 18y agoIf you want to learn a new language and a new framework, you should try Seaside. It is a very interesting approach to web development.
- icey 18y agoIn case you aren't familiar with Seaside, the underlying language is Smalltalk.
- silentbicycle 18y ago...which is a really cool language, and has a much more conceptually elegant implementation of OO than the C++/Java-style, I think.