What theoretical and / or experimental features of a programming language exist?

I am developing a programming language solely for fun, and I want to add as many experimental features as possible, just to make programming in it something completely different, and it's not as bad as Brainf * ck or Malbolge.

However, it seems to me that I am poorly versed in new things, but I am sure that there are a lot of things that were talked about, but they never tried.

  • What experimental language features or concepts that are not implemented in the main languages ​​currently exist?

For example: if I asked about this, say, in 1960, the answer could be "Object-Oriented Programming".

I am sure that there are many unrealized ideas that computer scientists (recently) came up with, at least I was told so.

+7
programming-languages
source share
4 answers

One of the relevant research areas are dependent types . There are many more things you can do with those that have not yet been done.

+4
source share

DWIMNWIS ("What I mean, not what I say").

More seriously, an absolutely different feature (which would be very difficult to implement) would be an opportunity for a language program to be able to contain no concurrency problems.

Regarding the MUST-HAVE functions, I would say lambdas and First-class functions . Not entirely new or theoretical (how many years Lisp this year), but powerful and missing in many languages.

+2
source share

read ACM and IEEE publications for research ideas

0
source share

Here is an idea; and if anyone writes this, they should give me a loan for a loan! Auto build in arbitrary matrix patterns, so these matrices are not mathematical types, but rather a type of storage or structure. Depending on the template parameters, these matrices can be as simple as a scalar value, as complex as an almost infinite-dimensional object, in theory, if a computer can allow it without running out of memory, but in practice this will be limited by architecture, OS and compilers internal details of the size of their integer or integer type. Thus, you may have a small dimensional three-dimensional matrix, which is 3. The sizes are not exhausted, because it may look like this: Matrix<type, 1000000000,1000000000,1000000000> matOutOfBounds before a much larger dimensional matrix looks such as Matrix<type, 2,2,2,2,2,2,2,2> , which is an 8D volumetric matrix. Simplification can be performed if they are “ideal matrices”. This is where each dimension has the same number of elements, no matter how many sizes they have. For example: <3,3> <3,3,3> <3,3,3,3> - all ideal matrices. The simplification would be Matrix<type, 4^4> the same as Matrix<type, 4,4,4,4> , giving a 4x4x4x4 4D volumetric matrix with 96 elements in a 4D structure. Where the "Matrix" will be a three-dimensional volumetric matrix with many elements, but has a three-dimensional volumetric structure, since our current clocks and compasses work so that from 360 degrees to a full circle, 60 minutes, 60 seconds, except that there are many elements storing floats.

This below will look like a possible C ++ library that someone will include in their projects; but the idea here makes it an embedded language. Then anyone with your language and compiler can use them as they see fit. They can use them with any number of dimensions, for example, with the image of this template:

 // Header Declaration template<typename ClassType, unsigned int...> matrix{ }; // No need to show body just declaration for concept // User Code Would Be matrix<float,2,3,4,5,7> mat; // This would create a 2x3x4x5x7 matrix that is a 5th dimensional volumetric matrix // Default type matrix<int> mat2; // This creates a 1x1 matrix that would in essence be a scalar. 

Now what I showed is the current C ++ syntax for variable templates. The idea here would be that such types of matrix containers would be built in types!

Want to make them math? Of course, this is good, but the user will have to define their own “algorithms, methods, functions or routines” for this.

The reason they should be determined independently is as follows:

 mat<float, 3,3,3> mat1; 3x3x3 3D Volumetric Matrix - 27 elements mat<float, 5,5> mat2; 5x5 2D Linear-Quadratic (Area) Matrix - 25 elements mat<int, 6,7,8> mat3; 6x7x8 3D Volumetric Matrix - 336 elements mat<bool, 8> mat4; 1x8 1D Linear Matrix (Array); transpose? mat4::transpose; // built in - now 8x1 matrix mat4::transpose; // back to 1x8. class TheMotherLoad {// Many members and methods }; // ... mat<TheMotherLoad*, 9,9,9,9,9,9,9,9,9> mat9; // simplified version mat<TheMotherLoad*, 9^9> mat9 // A 9 Dimensional Volumetric container So the first the would be a Cube // with its sides having a length of 9 cells where the Volume 9^3 is the // First Order of what a Volumetric Matrix is. // Anything less is linear or quadratic either it being a scalar, // translation, an array, a line, a point, a vector, rotation, quadratic and area ) // Now that we have a cube that has 729 elements and the next // three 9s which are the 4th, 5th & 6th dimensions would act as another // 9x9x9 matrix surrounding the first 3 dimensions respectively. // Finally the 7th, 8th & 9th dimensions defines the "outer matrix" // that also has "9x9x9" elements. So in total the number of elements // in this matrix would be 729^3 and for every 

Because of the properties of how matrices are, what determines what type of mathematical operations can be done for them to be done from the outside.

0
source share

All Articles