Questions tagged [dynamic]
24 questions
20
votes
3 answers
Professional way to produce a large problem without filling up huge arrays: C++, free memory from part of an array
I'm developing a physics simulation, and as I'm rather new to programming, I keep running into problems when producing large programs (memory issues mainly). I know about dynamic memory allocation and deletion (new / delete, etc), but I need a…

Drummermean
- 327
- 2
- 7
8
votes
2 answers
Why generic interface cannot implement dynamic type?
If it possible
IList = new List ;
or
class A { }
class B: A { }
Why it is not possible to do
class U: IEnumerable {}
?

Yarl
- 288
- 2
- 13
8
votes
5 answers
Implementing a generic/dynamic custom property system in C#
I have an architecture design problem which I think is appropriate for this site.
Note that I have made an EDIT to this post below, reflecting my latest potential solution to this problem.
General problem description:
My primary goal is to design a…

Kris
- 81
- 1
- 1
- 8
8
votes
2 answers
Why don't Python and Ruby make a distinction between declaring and assigning a value to variables?
Two of the most popular dynamically typed scripting languages, Python and Ruby, do not make a distinction in syntax between the declaration of a variable and assignation of a value to it.
That is in both languages, declaring a variable n and…

Aviv Cohn
- 21,190
- 31
- 118
- 178
5
votes
5 answers
Why is C# considered a statically-typed language, although it contains keywords such as `dynamic` and `var`?
C# is considered a statically-typed language. However, it contains keywords such as:
var, which infers the type at compile time, and
dynamic, which determines the type at runtime.
Is this a contradiction?

X Y
- 301
- 3
- 9
4
votes
3 answers
Dynamically add/change attributes of values in C#
I want to tag the values of variables with a "quality" attribute that can be changed dynamically during my programs execution. My first thought was to abuse the standard attribute functionality by tagging the value with my custom quality attribute. …

Peter M
- 2,029
- 2
- 17
- 22
3
votes
1 answer
Dynamic execution of Template Literals using a Map
I have a system that is generating internal events for objects. I am extending their debugger to display a human-readable version of the events sent to the debugger.
For instance, the system will generate "OnClick" for the "Blue Button" control, on…

strattonn
- 131
- 3
3
votes
1 answer
Are there security implications to using dynamically-assigned TCP port numbers?
I'm getting pushback from operations for having a server process listen on a dynamically-assigned port number (i.e. it binds a socket to a port number of 0, triggering a dynamic assignment by the OS, which it retrieves using getsocketname()). The…

Chap
- 723
- 1
- 7
- 18
2
votes
1 answer
Dynamic Scheduling Algorithm
Recently I got interested in scheduling problems or rather dynamic scheduling problem. The problem is that I want to develop some kind of layer in my application which will be polling circa about 50-100 e-mail boxes on regular basis. I do not have…

Apple Pie
- 21
- 2
2
votes
1 answer
Differences between Dynamic Dispatch and Dynamic Binding
I've been looking on Google for a clear diffrentiation with examples but couldn't find any.
I'm trying to understand the differences between Dynamic Dispatch and Dynamic Binding in Object Oriented languages.
As far as I understand, Dynamic Dispatch…

Aviv Cohn
- 21,190
- 31
- 118
- 178
1
vote
1 answer
Am I allowed to use a GPL dynamically-linked library if I'm developing on a proprietary runtime engine?
Basically, title.
This is just me trying to clarify part of the GPL for myself.
Let's say I'm developing a program that compiles and runs on a non-free runtime engine.
I'm perfectly willing to share and license my own source code under the GPL, but…

Chris Iverson
- 11
- 1
1
vote
3 answers
Addition or deletion of elements of a dynamic array
Is there any consensus among programmers (or a common convention) on the "right way" to deal with the addition or deletion of one or more elements of a dynamic (mutable) array at runtime while gracefully handling changes to the references to the…

ColdCold
- 119
- 3
1
vote
1 answer
Ignoring the generic part of a type while an object is being passed
I have a message class that holds the name of a destination, and a generic variable acting as the message payload
public class Message {
public string Destination
public T Payload
// ... constructors, functions, etc. ...
}
This way,…

9a3eedi
- 2,101
- 3
- 23
- 29
1
vote
1 answer
Dynamic method creation in python
I have a class that will have a number of external methods that will all call the same smaller set of internal methods. So something like:
obj.method_one(a, c) and
obj.method_two(a, c)
where obj.method_one calls obj._internal_method(a, c, y) and…

tonyl7126
- 297
- 3
- 13
1
vote
1 answer
What is the best way to handle dynamic content?
So we run a site where there are elements of the interface that could potentially be changed at any moment in the backend. Specifically we run a web service where certain functions are loaded dynamically. However, there are times where we remove…
user1561753