Well sure you have to load the jdk as a jar file in order to use it, just like any other library. The same holds for haskell and C#. But it's perfectly feasible--much easier than in C/C++, where dynamic calls are a huge pain in the neck, never mind needing installed .h files and compiler for it to "work" at all.
Functions from data files
Collapse
X
-
... and, actually, I don't I've seen a single example of this being done in practice (other than development tools, possibly) of over 10+ years of Java development. Do you have any examples?
Haskell is a language not a compiler. I think you mean GHC Haskell. Can't comment on C# as I don't know enough about it.
In the GHC Haskell case, unless you're using only the "base" set of packages (which ship with GHC and are always installed) then it's going to be a huge pain too. Just try using e.g. xmonad or yi or propeller from a sandbox[1] and you'll see what I mean. (At least this was the case ~3-12 months ago.)
[1] To avoid having to install packages "globally". Perhaps nix-style builds will eventually get around this problem, but it's still a bit unstable.Last edited by AnonymousHero; November 15, 2016, 07:49.Comment
-
Given my experience with Pyrel and trying to make a fully-general equipment/stats/spells system, it's not worth the complexity of implementation. I would definitely stick to trying to support the current use case only, at least as far as data files are concerned. We want to make it easy to add new behaviors, but really mostly only in that we have a big glowing sign in the source code that says "ADD NEW BEHAVIORS HERE". Ideally the dev creates a function, declares a string for it, adds the string/function pair to a mapping somewhere, and then starts using the new behavior in the data files.
I do think the situation with the X macros could be improved a little bit[1] with a small custom code generator instead, but it's likely to be a small improvement.
Anyway, I think this this topic's been more or less exhausted, so I'll leave it at that .
[1] X macros get a bit unwieldly editing-wise and rather error prone if you need to remove columns (or insert columns in the middle). They're also a bit annoying if you need to derive other compile-time data from them (e.g. the classic MAX_* macros).Comment
Comment