Comments (9)
我觉得也是自动检测
from cm-document.
Get
from cm-document.
那你觉得,是生成一个struct然后传入被捕获变量好,还是把被捕获变量挨个传入好?
from cm-document.
@SmallLuma
from cm-document.
挨个传入吧。
生成一个struct感觉要多写很多。
或者我们可以用元组,不过目前还没有定这个语法。
from cm-document.
元组不就是动态生成struct吗。。。
from cm-document.
clang的做法是生成了一个类来放。好处就是,在把capture了变量的lambda传递给其他函数时,这个生成的类也要跟着一起被传递出去。那么如果只有一个类,那增加的参数也就只有一个。挨个传入的话就是动态确定的。
我现在也拿不定主意,其实。
from cm-document.
不过我觉得还是自动检测比较好
from cm-document.
我都没反对了,肯定自动检测啊。
感觉西佳佳的做法挺好的,我就参考西佳佳了
from cm-document.
Related Issues (20)
- Some advice and questions about language features HOT 12
- Syntax sugar when there's only one lambda parameter HOT 1
- AST should generated something like sourcemap HOT 12
- about object and classes HOT 1
- about traits and interfaces HOT 10
- About macros HOT 6
- What exactly is "string"? HOT 12
- Do we really need object-oriented features? HOT 5
- Allow force noinline HOT 10
- About digit literals HOT 3
- About operators HOT 3
- Notepad++ syntax highlight HOT 4
- About pointers HOT 4
- Allow non-lambda overloading HOT 6
- About LiteralExpression HOT 2
- About foreign function interfaces HOT 10
- For-each syntax sugar HOT 9
- Syntax sugar for simple lambda expressions HOT 2
- String literals HOT 1
- About modules HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cm-document.