What to use, C # or F #? In this case, the "real world"

I read some interesting C # / F # comparisons here on stackoverflow. So, first of all, thanks to all participants!

There are many accolades for F #, the reasons for choosing C # are a little harder to come by. In any case, I'm still not sure which one follows for this small and simple β€œapplication for the real world”: imitation of a herring school.

I do not know functional programming (yet), but from the point of view of OO, some of the projects seem straightforward: make the Fish class and derive these classes from it: Herring, Predator, Prey. Each of them should have such properties as position, direction and speed.

You can see many collections: each small increment of time, each Fish object checks its environment and updates its actions.

I still don't know if this processor will be intense enough, and I will take care of multiprocessing, but maybe so F # sounds good there.

I am sure that I will spend a lot of time on prototyping and studying - I heard that F # is good for this.

From what I read, C # is better suited for the GUI, but it will not. Building some curves would be nice, but I would prefer to send most of the results to an open Excel worksheet or to a database. Not sure how C # and F # are different for Excel / databases.

, - - # , F #, ? ??

: , , , - . , , , F # , , , # OO, , , , , (, F #.)

+3
4

, . F # , , , F # .

, :

(), OO, : Fish : Herring, Predator, Prey. , , .

. ( ), , , , Herring Predator . .

, "" "" ( #, F #). (. 14), ( parallelism), Excel F # ( , #), (. 13).

, F # , , , , , F # ( - ).

+4

, F # - #. , F #, GUI #, .

+14

.

( , ), - , , , # , OO .

, , , F # - .

+3

It looks like you have a good chance to try both, either by mixing them, or by doing all of this in both languages, so that you can experience both of them and find out all the differences between functional and OO programming. By the way, you can do OO in F #, since it is a hybrid language, and you can perform functional programming in C #, of course, with limitations.

In addition, you should not have any real problems accessing the database or integrating Excel from any language.

+3
source

Source: https://habr.com/ru/post/1761031/


All Articles