Re: F# fsharp

Peter Antal <[email protected]>
Newsgroups gmane.games.devel.sweng
Message-ID <[email protected]>
> See: Linq.  No inbuilt regex syntax that I'm aware of, but a fairly novel
> approach to list manipulation.  Novel in the sense of eschewing the more
> typical functional paradigm in favor of something SQL-inspired -- I haven't
> yet used it enough to decide if it's a good or bad idea, but it's certainly
> a far cry from Java wrt handling of lists.
>
>
If I might go out on a limb for a sec, I would suggest Linq exploits ideas
from functional programming model (particularly wrt lambda expressions being
the foundation) to allow dataset interactions to be a first class citizen in
the CLR language implementations. As a contrast to the old mode of an
application developer feeding in SQL query strings which have no compile
time validation or tooling integration, they can specify traditional data
operations such as Where, Select, OrderBy operations as method calls against
their data sets. In my experience, I've found cases where some peers wrote
linq queries with a fraction of the development and validation work required
for equivalent traditional imperative code, although sometimes, we would
need to revisit them for a more explicit implementation due to corner case
issues. Also, as a different paradigm of coding mixed with imperative, folks
can sometimes accumulate complex queries on a single line which can become a
maintainability hazard if your entire team doesn't drink the LINQ/Lambda
expression coolaid.

It's a powerful data tool for operating against collections of data - in
principle a developer could cut out a lot of their small boilerplate for
loops with queries against delegates, at the cost of less "transparent" code
which could introduce inefficiencies not present in equivalent hand-written
code. For application DB jockies, there's not much downside for them on the
switch. Somehow I doubt that many red blooded game developers who pride
themselves on a being "close to the metal" would have much interest or be
able to find much comfort with such a feature.



One other thought comes to mind in all of this discussion with functional
programming - What about parallelism, as we see the average number of cores
increase in lieu of significant processing speed improvements? Code written
with care to minimize side effects lends itself to reducing the scope for
race conditions in parallel/async sections... Has anyone seen any
interesting case studies or personal experiences on this front, wrt
multithreaded game development in a functional language?

Kind Regards,

Peter

_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.