大纲 [英] outline

查看:72
本文介绍了大纲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得需要一个大纲说明符来支持java风格的编程。

解决方案

Agent Mulder < MB ******************* @ home.nl>写了...

我觉得需要一个大纲说明符来促进java风格的编程。




没有需要在语言中做任何事来模仿

任何其他语言。什么问题,否则无法解决,

将''概述''解决?如果您可以回答这个问题,请将您的建议(包括理由)发布到comp.std.c ++。


Victor


代理Mulder写道:

我觉得需要一个大纲说明符来促进java风格的编程。
...




你不觉得C ++已经从java-style

编程中受够了吗?而且甚至没有明确地为它提供便利。


-

祝你好运,

Andrey Tarasevich

Brainbench C和C ++编程MVP


AM>我觉得需要一个大纲说明符来

AM>促进java风格的编程。


VB>语言中没有必要做任何模仿的事情

VB>任何其他语言。什么问题,否则无法解决,

VB>将'概述''解决?如果你能回答这个问题,请发布

VB>你的建议,有正当理由,comp.std.c ++。


使用java风格的编程我的意思是你

取消.cpp。 h - 一对文件。所有

函数定义直接在类

声明中。编译器尊重这一尝试

并生成非常快速但又大的应用程序。

为了减慢程序速度,我需要一些

函数要扩大''大纲''

class音乐

{

public:void init()

{

// 1400行初始化代码(跳过)

for(;;); //这迫使我的编译器* NOT *内联此函数

}};

这给我留下了一条警告信息:

警告W8027 :包含for的函数不会内联展开

我挥动我的帽子并大喊没关系!。但为什么不这样写




class Music

{

public:outline void init()

{

// 1400行初始化代码(跳过)

}};

确保编译器将其从类

定义中删除,同时保持类的结构完整。


-X

I feel the need for an outline specifier to
facilitate java-style programming.

解决方案

"Agent Mulder" <mb*******************@home.nl> wrote...

I feel the need for an outline specifier to
facilitate java-style programming.



There is no need in the language to do anything to emulate
any other language. What problem, otherwise unsolvable,
will ''outline'' solve? If you can answer this question, post
your suggestion, with the justification, to comp.std.c++.

Victor


Agent Mulder wrote:

I feel the need for an outline specifier to
facilitate java-style programming.
...



Don''t you think that C++ already suffered enough from "java-style
programming"? And that without even trying to facilitate it explicitly.

--
Best regards,
Andrey Tarasevich
Brainbench C and C++ Programming MVP


AM> I feel the need for an outline specifier to
AM> facilitate java-style programming.

VB> There is no need in the language to do anything to emulate
VB> any other language. What problem, otherwise unsolvable,
VB> will ''outline'' solve? If you can answer this question, post
VB> your suggestion, with the justification, to comp.std.c++.

With java-style programming I mean that you
do away with the .cpp .h - pair of files. All
function definitions go directly in the class
declaration. The compiler honors this attempt
and generates very fast, yet big applications.
In order to slow my program down, I need some
functions to be expanded ''outline''
class Music
{
public:void init()
{
//1400 lines of initialization code (skipped)
for(;;); //this forces my compiler to *NOT* inline this function
}};
This leaves me with a warning message:
Warning W8027: Functions containing for are not expanded inline
I wave my hat and shout back "Never Mind!". But why not write
it like this:

class Music
{
public:outline void init()
{
//1400 lines of initialization code (skipped)
}};
to make sure the compiler takes it out of the class
definition while leaving the structure of the class intact.

-X


这篇关于大纲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆