Disadvantages of First-class functions [closed] - function

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Are there any disadvantages to having first class functions in a language?
Joel in this entry says
Object-oriented programming languages aren't completely convinced that
you should be allowed to do anything with functions.
I might be naïve here, but why don’t all languages support first class functions if there aren’t much issues

In an ideal world where there was never a cost associated with developing new features, the only downside I can see to including functional programming techniques would be confusion to developers who are not familiar with functional techniques (and I don't really see that as much of a downside).
In reality, treating functions as first-class typically requires significant rewrites to the compiler itself. The cost of doing this has to be weighed against the long-term gain.

Adding this feature might be a disadvantage if introducing the change requires a costly re-write of language compilers, interpreters, and other tools. It might also be a disadvantage if the language's culture is not familiar enough with the advantages provided by this feature in which case adding the feature is a waste of effort.

Additionally, first class functions require runtime interpretation of code and some form of garbage collection. Both of these add overhead that might not be suitable for certain problems and languages.

Related

GPGPU performance in high-level languages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
For my science fair project I have to write a computationally-intensive algorithm that is well suited to parallelization. I have read about OpenCL and CUDA and it seems they are mainly used from C/C++. While it would not be that difficult for me to pick up a bit of C to write a simple main, I was wondering how big the performance hit would be if I used Java or Python bindings for my GPU computation? Specifically, I was more interested in the performance hit using CUDA because that's the framework I'm planning on using.
In general, every time you add an abstraction layer you're loosing performance but, in the case of CUDA this is not completely true because, whether using Python or Java you'll end up writing your CUDA kernels on C/Fortran, so the performance in the GPU side will be the same as using C/Fortran (check some pyCUDA examples here)
The bad news it that Java and Python will never achieve the performance of compiled languages such as C on certain tasks, see this SO answer for a more detailed discussion about this topic. Here is a good discussion about C versus Java, also on SO.
There are many questions and discussions about performance comparison between interpreted and compiled languages, so I encourage you to read some of them.

What is "overkill"? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Programmers often wonder if the use of a certain library or programming style is overkill. They also often claim that this is the case (and they are often believed).
What does "overkill" mean in the context of programming?
"overkill" is typically used to mean deploying overly flexible and/or over-engineered solutions to solve what is ostensibly a simple and highly localized problem. The canonical example is FizzBuzz Enterprise Edition.
The term "Overkill" literarilly (if there was ever a literal use of it) refers to the action of killing something or someone, with more resources than necessary. Something like shooting a deer 50 times to make sure it dies.
In programming it applies for the same principle: making use of more resources than necessary or to find an overly complex solution to a simple problem.
Some simple examples are
for i=1 to 100
x[i]=2^z[i];
y=x;
end
Where copying the entire array x in every iteration step achieves the desired result but you could also copy it elementwise y[i]=x[i] saving you some 900 operations and is thus an overkill.
Using the OpenCV library to threshold an image is definetley possible but uses many more resources than strictly necessary and is an exagerated example of an overkill.

Does the GameEngine you plan to use need to be written in the same language you are programming the game in? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
While my common sense says "Yeah. Duh.", I thought I read something somewhere long long ago that referenced the ability to use different programming languages in harmony and wondered if something like that applied here.
IE, if a game engine is written in C++, but the game I'm developing has been written in C#/XNA, can that game engine be utilized for this game?
Usually the language you use to write game engines aims for efficiency and speed. The language you use to write games aims for simplicity and expressiveness. So, it totally makes sense to use a different language for each purpose.
How they will work together is a different story. Usually, the engine's API will be given a convenient interface to be used in the game "scripting" language, so the latter will interact with the engine through successive API calls. The "heavy lifting" will be all done by the engine though...

Software Development Methodology [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'd like to know the difference between Software Development Process and Software Development Methodology if there is any.
A process is only a component of a methodology. A methodology has:
A process aspect: what tasks are to be carried out?
A product aspect: what things are to be used and/or created?
A people aspect: what people and teams are going to do all this?
A time aspect: how does all this get organised in time?
A modelling aspect: what modelling units (language) are used to capture all this?
This is a simplified interpretation of the more formal definitions that you can find in ISO/IEC 24744 Software Engineering - Metamodel for Development Methodologies.
Still, the terms "method", "methodology" and "process" are used by different people with different meanings. After 20 years working in this field, I think that trying to agree on a standard use is futile. :-)
It's the same as the difference between process and methodology in any other discipline. I think of the processes as the implementation of the methodology.
The methodology is more a general mindset which sets basic parameters. A process is a concrete manifestation within the given borders of the methodology. You can think of agile as methodology and Scrum as concrete implementation.
Sometimes it's hard to distinguish between the two. As rule of thumb: If you can immediately start to work with it, it's probably a process. A methodology requires more adaptation .
A more wide term would be Software Development Philosophies.
http://en.wikipedia.org/wiki/List_of_software_development_philosophies

How do you estimate a EAI project using Function point? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
How do you estimate a EAI project using Function point?
FP analysis is inappropriate for integration projects of any sort as it presupposes that you can specify the application up-front. Most of the work in any integration project of non-trivial complexity is reverse-engineering the nuances of the environment. Typically the environment will not be exhaustively documented in the sort of cases you would expect to use an EAI system in.
By the time you have actually done this level of reverse engineering to the point of having a complete specification you have done most of the work in the project - the actual development is fairly short and sweet by comparison. Therefore the function point analysis is only providing an estimate for a small part of the system.
As an aside, much of the work I do is data warehouse systems in Commercial insurance companies, where extensive prototyping and reconciliation exercises to produce detailed specification documents are actually quite appropriate to the environment. Typically this takes longer than actually developing the production system as most of the data issues are resolved in the prototyping work. EAI systems have a similar class of implementation issues.
Well given that FP counting is based on storage and end user interface, not sure if its even meaningful for EAI (from what little I remember).
I would say you can't, at least not in a useful way. FP counting is generally viewed as a dubious practice of varying accuracy, doing it to an integration project would just add more fuzzyness.