Questions tagged [language-concepts]

Use this tag to ask about how a particular idea (arrays, lists, tables, search, sort) is implemented in language X or how to understand a basic part of the language.

Often there is a particular concept that isn't quite grouped into any of the other tags, or it is just too embarrassing because it's a "newbie" idea. Or there isn't a concrete problem to solve and you were just wondering about how something works in language X.

If you wanted to ask about which version of the moot() function is used if class A is inherited from class B and implements C, tag it with inheritance..

But also use this tag to point out it's more of a "Hmm..." question than a "How do I solve this" question.

98 questions
2
votes
5 answers

Studying Objects and Classes

I have a test later today, and I think I may be stuck on this part of the study guide: Classes and objects, references, methods; the class as a pattern for creating objects, the concept of a class and object as defining a unit with data members…
aufty
  • 407
  • 2
  • 9
  • 26
2
votes
1 answer

Clarifying JavaScript prototypes

Suppose I have a child function: function Child() {} and have a parent function: function Parent() {} then I set the Child's prototype to a new instance of Parent: Child.prototype = new Parent() the confusion is each time when I create new an…
hh54188
  • 14,887
  • 32
  • 113
  • 184
2
votes
1 answer

Abstract method and mixin in python

I'd like to submit a code pattern I often see in my python code, here at work, and I'm not satisfy with it and I'd like a better solution. Here is what we have today: class AbstractClass(object): .... def method1(self,...) raise…
Gaetan
  • 488
  • 4
  • 13
2
votes
4 answers

Recursive programming calls versus dynamic programming calls

I'm taking a Java 2 course and trying to study but I don't understand this concept: What is the difference between recursive programming calls and dynamic programming calls? What would be an example of each?
JavaJew22
  • 83
  • 1
  • 5
2
votes
1 answer

Why doesn't my new control appear if I pass the parent control to Create instead of assigning the Parent property?

In Lazarus I'm trying this: TabSaveButton := TButton.Create(nil); with TabSaveButton do begin Parent:=NewTab; Width:=75; Height:= 25; Top:=530; Left:=715; Caption:='Save'; end; And it works. I.e., I get the button and…
itsols
  • 5,406
  • 7
  • 51
  • 95
1
vote
1 answer

Java import wildcard accessibility for nested static classes

How does the java accessibility (or perhaps, scope) work with respect to type import multi-level nested classes? An example: ClassA.java: package com.oracle.javatests; public class ClassA { public static class NestedAA { public void…
1
vote
1 answer

What's the idea behing W-, P- and I-files?

I'm working with appBuilder and procedure editor in Progress Release 11.6. As mentioned in some previous questions, regularly I'm having problems with the appBuilder, not wanting to open files, corrupting them (deleting parts of source code), ...,…
Dominique
  • 16,450
  • 15
  • 56
  • 112
1
vote
1 answer

Self-Contained Systems vs Monolithic

I just need to know is there is a difference between Self-Contained Systems (SCS) and the Monolithic ones, And SCS is different from microservice or it's the same?
TheGeeky
  • 962
  • 1
  • 12
  • 34
1
vote
3 answers

Are f-strings a unique feature to python (3.6 and higher)?

With an f-string you can fill in 'placeholders' in a string directly with some variable value. Opposed to, let's say using the str.format() method, often seen. Example: In [1]: x=3 In [2]: y=4 In [3]: print(f'The product of {x} and {y} is…
muuh
  • 1,013
  • 12
  • 24
1
vote
3 answers

Are there examples for programming-languages support automatic management of resources besides memory?

The idea of automatic memory management has gained big support with new programming languages. I'm interested if concepts exists for automatic management of other resources like files, network-sockets etc.?
Mnementh
  • 50,487
  • 48
  • 148
  • 202
1
vote
3 answers

What's the point behind passing functions as arguments to other functions?

It's a rather general purpose question and not specific to any one language. I don't quite understand the point behind passing a function as an argument to another function. I understand that if a function, say, foo1() needs to use some result…
dhanshreeA
  • 98
  • 9
1
vote
3 answers

Java OO concept - correct use of interface & abstract class?

Let's say we have an analytic application (AppX) that allows the import and export of analytic files. We want to build some functionality into it to allow those files to be shared in an enterprise collaboration platform, however we use 2 different…
Wayneio
  • 3,466
  • 7
  • 42
  • 73
1
vote
0 answers

Searching for the practical use of EVAL function in BASIC

I'm currently re-working a BASIC I've created (a byte-code interpreter) and can't decide if I will include an eval function with it. I'm having doubts about its usefulness. I can think of 2 uses for an eval functionality: It seems tailor-made for…
1
vote
2 answers

Connection between Class and primitive types?

I thought I understand concept of class(object) Class, but reading about it in Java API, I found this: The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class …
misty
  • 123
  • 13
1
vote
0 answers

NgModelController $parsers and $formatters doesn't works with $render and $viewValue

I am trying to understand the $formatters and $parsers of NgModelController and with this excellent example I have created this demo. But having few questions which needs to clear Below is my main code
xkeshav
  • 53,360
  • 44
  • 177
  • 245