Questions tagged [language-features]
A language feature is a distinct aspect of a programming language, such as binding rules, lexical design, or facets of the type system.
language-features
617
questions
0
votes
4
answers
198
views
How to feature test for BigInt support?
I'm not familiar with modern JS and tooling to even try something.
References:
https://github.com/tc39/proposal-bigint
7
votes
3
answers
815
views
How to compose functions through purely using Python's standard library?
Python's standard library is vast, and my intuition tells that there must be a way in it to accomplish this, but I just can't figure it out. This is purely for curiosity and learning purposes:
I have ...
0
votes
0
answers
24
views
"gzip" feature problem trying to implement rolling logger in Rust (programmatically) [duplicate]
I've found this page. At the bottom of that page the author says he's giving a programmatic way of configuring so as to have a console logger component but also a rolling file logger component.
I'm ...
0
votes
2
answers
52
views
How to use integer methods using `method`, not their infix form, in Ruby
I am looking to programmatically apply a typically infixed operation (eg: +, -, *, /) on two integers, where the operation is specified via a string. I have had success accessing the method itself ...
0
votes
1
answer
64
views
What exactly are the "auto-implemented properties" introduced in C# 6.0?
Microsoft's version history page mentions "auto-implemented properties" as one of the new features added to C# in version 6.
Their page on auto-implemented properties gives the following ...
4
votes
0
answers
52
views
Why can a python dictionary be modified in the variable of a list comprehension?
From an amazing (and evil) video about the Oneliner-izer, I learned that a Python dictionary can be modified in the variable of a list comprehension. I tried to run the following code:
some_dict = ...
0
votes
1
answer
111
views
Is there a method of initiating a ThinBox<[T]>?
I have been dabbling in experimental features lately and have been using them for a library I'm building. I am trying to reduce the size of an enum by using ThinBox<[T]> to store contents in a ...
3
votes
0
answers
983
views
How does binding work in Rust match statements with the @ "at sign"?
I'm reading the Rust by Example page on Binding in match statements and this sentence is confusing me, "Indirectly accessing a variable makes it impossible to branch and use that variable without ...
0
votes
3
answers
1k
views
Is there a way to specify function parameters and return value as const in dart?
I wrote an extension function to add SizedBox between every child in Column or Row to add space between child, instead of putting SizedBox between every child, for which I didn't find any other way ...
0
votes
0
answers
62
views
Is it possible in C# to give multiple names to a single variable/property? [duplicate]
Say you have the following code:
interface Foo
{
public int Value { get; set; }
}
class Bar : Foo
{
public int Value { get; set; }
}
Now suppose I'd like to give the Value property a more ...
0
votes
1
answer
110
views
PHP working after Fatal Error in the include file. Error disappear in the try-finally-return
index.php
<?php
function bar()
{
try {
$res = 'loading foo:';
include 'foo.php';
} finally {
return $res . 'finally.';
}
}
$res = bar() . " Why it's ...
0
votes
1
answer
356
views
How do python iterators work memory-wise? What are they designed for?
I came across everything related to iterators today and there are still some things I don't understand. I'm still a Python beginner but I'll try to explain the best I can.
I understand the difference ...
3
votes
0
answers
231
views
How to shift focus on the side bar of VSCode programmatically
How to shift focus on the side bar of VSCode programmatically?
Is there any specific command/end-point I can make use of?
I have some custom contributes.viewsContainers, they are not getting over-...
2
votes
1
answer
377
views
VBA With statement equivalent in other languages
In VBA there is a cool feature called a With statement that kind of lets you set the global scope for a block of code. This is useful to change multiple fields of an object and to call methods.
Here ...
0
votes
1
answer
220
views
C#10: A namespace-scoped Access modifier [duplicate]
As in the title, I would love to see this in C#.
namespace PrivateStuff; //note: filescope namespace here!
public class PartiallyVisibleOutside
{
public int A;
namespace int B;
}
public class ...