Language Features - How Much Do You Use?

x BlueRobot

Administrator
Staff member
Joined
May 7, 2013
Posts
10,400
This may seem a silly question, and of course, it depends upon the type of program your writing but generally, how often do you tend to use the more language specific features?

I always find that most people will always use the following:


  • Arrays
  • Data Structures and Classes
  • Functions
  • Conditional Statements
  • Pointers

These are common, but not so common as the above:


  • Multiple Threads and Multiple Source Files
  • Preprocessor Directives
  • Templates
  • Enumerations

To be honest, that probably covers almost everything :rofl12:

I find that it depends upon the kind of programmer the person is, since a Computer Scientist is mostly going to apply mathematics to algorithms and data structures and calculate their efficiency.
 
Multiple Threads and Multiple Source FilesPreprocessor Directives
Templates
Enumerations

All of them, and regularly.

There are many more similar things though. In order to be a good programmer, it's really important that you know what all of them are. If you don't, how are you going to know to use them when applicable?

Some questions for you:
Do you use an OOP or procedural structure to your code? And I don't just mean inheritance, but absolutely everything from interfaces, access control, abstraction, virtual, design patterns, etc.?
What about LINQ in C#, VB, ...?
events and delegates?
static, volatile, readonly?
unsafe, fixed
lock?
yield?
asm?
smart pointers? (..ish)
new/delete, malloc,calloc,etc./free,

That's off the top of my head, there's probably loads of others too. I was thinking about C based languages when writing this, but I am sure most translate across in one way or another to various other languages. And yes, I do use most of these frequently (not unsafe, fixed, or asm very much though)

Richard
 
I use OOP, so I would use virtual functions and the key concepts behind it. Most of the my Win32 API and the driver frameworks seem to rely heavily on data structures and pointers. New keywords are only really intended to allocate objects (not in OOP terms) onto heap rather than the stack. I was quite surprised when I created a small program which intentionally caused a stack overflow, it ran for a few seconds and then crashed.

I've been wanting to use asm. I do agree with you about knowing all the aspects of the language, I was just wanting how much people actually use regularly.
 
This may seem a silly question, and of course, it depends upon the type of program your writing but generally, how often do you tend to use the more language specific features?

I always find that most people will always use the following:


  • Arrays
  • Data Structures and Classes
  • Functions
  • Conditional Statements
  • Pointers

These are common, but not so common as the above:


  • Multiple Threads and Multiple Source Files
  • Preprocessor Directives
  • Templates
  • Enumerations

To be honest, that probably covers almost everything :rofl12:

I find that it depends upon the kind of programmer the person is, since a Computer Scientist is mostly going to apply mathematics to algorithms and data structures and calculate their efficiency.

The first list with the exception of pointers is not very language specific, and is mainly the fundamentals in programming for the most part. (If you don't use control statements then you're not really programming much.) All of what was listed is part of my project in some way usually though, especially when I'm using C++. Language specific features, as a list could go on forever though...

Typedef's, auto_ptr, Classes, Interfaces, inline assembly, etc...

Multiple Threads and Multiple Source FilesPreprocessor Directives
Templates
Enumerations

All of them, and regularly.

There are many more similar things though. In order to be a good programmer, it's really important that you know what all of them are. If you don't, how are you going to know to use them when applicable?

Some questions for you:
Do you use an OOP or procedural structure to your code? And I don't just mean inheritance, but absolutely everything from interfaces, access control, abstraction, virtual, design patterns, etc.?
What about LINQ in C#, VB, ...?
events and delegates?
static, volatile, readonly?
unsafe, fixed
lock?
yield?
asm?
smart pointers? (..ish)
new/delete, malloc,calloc,etc./free,

That's off the top of my head, there's probably loads of others too. I was thinking about C based languages when writing this, but I am sure most translate across in one way or another to various other languages. And yes, I do use most of these frequently (not unsafe, fixed, or asm very much though)

Richard

stackalloc? (even though required to be in unsafe context) :grin1:
 
Last edited:
Multiple Threads and Multiple Source FilesPreprocessor Directives
Templates
Enumerations

All of them, and regularly.

There are many more similar things though. In order to be a good programmer, it's really important that you know what all of them are. If you don't, how are you going to know to use them when applicable?

Some questions for you:
Do you use an OOP or procedural structure to your code? And I don't just mean inheritance, but absolutely everything from interfaces, access control, abstraction, virtual, design patterns, etc.?
What about LINQ in C#, VB, ...?
events and delegates?
static, volatile, readonly?
unsafe, fixed
lock?
yield?
asm?
smart pointers? (..ish)
new/delete, malloc,calloc,etc./free,

That's off the top of my head, there's probably loads of others too. I was thinking about C based languages when writing this, but I am sure most translate across in one way or another to various other languages. And yes, I do use most of these frequently (not unsafe, fixed, or asm very much though)

Richard

stackalloc? (even though required to be in unsafe context) :grin1:

Hmmm. That's an interesting one. Just had to look up some more details about it. I don't think I've ever had to use it actually, although that does not surprise me too much as I've only ever used unsafe a couple of times.
 
There's also dynamic, which some have heard about, but you probably don't see it much in the code. I've only ran across a couple times where it has been useful.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top