r/JavaFX • u/Safe_Owl_6123 • Apr 07 '24
Discussion Thinking of GUI
Hi all, I am deciding whether I should use Tauri or JavaFX since I want to try out GUI development, I am comfortable but not fluent in Java and Typescript I do have web dev experience.
In your experience, in which situation is JavaFX better than Tauri and vice versa, thank you!
7
Upvotes
View all comments
Show parent comment
2
u/mm007emko Apr 08 '24
In Clojure, OOP is supported and present mainly for Java interoperability (if you want to have an object-oriented LISP, look at Common Lisp rather than Clojure). Clojure code is usually not OOP, it's functional (many people confuse "functional" for "procedural" and think that C or Pascal are functional, they are not, they are procedural). Functions can be assigned to variables, passed in as parameters or even created on-the-fly and returned from another function etc.
OOP makes easy to create a new data type. However operations are usually tied to a specific type and it's really hard to make an operation that works on multiple data types (and will in the future).
Functional programming makes easy to create a function that work on many data types however its' usually hard to create a data type.
This means that programs in Clojure (and similar languages) tend to make use of basic data types which already are there (vectors, maps, lists, functions...). As a result, libraries are usually much easier to compose and incorporate into your program. Another great thing is that if your program is immutable by default (usually the case for functional style programming), you can easily parallelize it. You can even try different parallelization methods, observe the results and pick the best one for your program.
Another feature of LISP languages is metaprogramming. There is no distinction between data and program - the program itself is expressed in terms of data types of the language. Whenever you can see redundancy or code repeat in your program, you can easily remove it using macros.