Одно тонкое различие - то, что перечисление должно быть определено в заголовке и видимое для всех. При предотвращении зависимостей это - боль. Например, в PImpl, добавляя перечисление несколько контрпродуктивно:
// MyPImpl.hpp
class MyImpl ;
class MyPimpl
{
public :
enum { Life = 42 } ;
private :
MyImpl * myImpl ;
}
Другой третьим решением было бы изменение на "константе статическая" альтернатива, предложенная в вопросе: Объявление переменной в заголовке, но определении его в источнике:
// MyPImpl.hpp
class MyImpl ;
class MyPimpl
{
public :
static const int Life ;
private :
MyImpl * myImpl ;
}
.
// MyPImpl.cpp
const int MyPImpl::Life = 42 ;
Примечание, что значение MyPImpl:: Жизнь скрыта от пользователя MyPImpl (кто включает MyPImpl.hpp).
Это позволит автору MyPimpl изменить значение "Жизни" по мере необходимости, не нуждаясь в пользователе MyPImpl для перекомпиляции, как полная цель PImpl.
I switched to notepad++ when I had the same kind of problems with DreamWeaver. I tried some other programs too, but they were too complicated for my needs.
If all you need is color-coding and ftp-support, notepad++ is a good choice.
Visual Web Developer Express, облегченная версия Visual Studio.
Каждый веб-разработчик должен писать разметку от руки - все формы автоматизированной абстракции препятствуют вашему пониманию и осведомленности о коде и создают проблемы с обслуживанием в будущем. Вы можете сказать, что я фанат этого вопроса.
Исходя из этого, я могу от всей души порекомендовать Editplus : есть раскраска кода, FTP и огромное количество функций-сахара из строки дублирование макросов.
If you're using a Mac you should take a look at Coda
Well personally I use Programmer's Notepad but it doesn't support the facility to upload files to the server. You could get Notepad++ and this FTP plugin. I haven't tried Notepad++ but I'm sure that it isn't WYSIWYG.
Возможно, KompoZer ? В нем есть все функции, которые вы просили, и есть версия для Windows (а также Mac и Linux).
Dreamweaver... Not my cup of tea, because it lacks good support for modern web programming with Javascript or PHP.
For primary design, I use WeBuilder from Blumentals. Its also a good and not expensive PHP and Javascript IDE with debugging support and also has good CSS support with a built-in CSS editor. I'm not a big fan of text editors like Notepad++ as an IDE replacement, because you often need a lot of additional plug-ins to have similar features like a IDE. But for some files or quick editing nothing can beat such editors (I like Notepad++ the most on Windows).
So for Windows I would prefer WeBuilder for all things (design & programming).
You use only Windows? For Linux there are other alternatives too ;)
When developping in PHP, I generally use Eclipse PDT.
If you are more oriented towards HTML/CSS/Javascript, you might be interested by Aptana, which is based on Eclipse too... Which means it can use lots of plugins, including some to work directly on a server, I suppose (see TM/RSE, for instance).
Note than Aptana can also be installed into an existing Eclipse installation, as a plugin.
Oh, also, I almost forgot : Eclipse is free, and there are both a free and a commercial version of Aptana.
(One bad thing about Eclipse being it requires a quite powerful computer -- at least 2 cores and 2 GB of RAM, if you want to use any other application at the same time...)
E Text Editor, a Textmate clone for Windows, claims to have FTP Support. But i haven't used this feature before.
Мне нужно цветовое кодирование и возможность открывать / сохранять и редактировать файлы прямо с сервера, поэтому мне не нужно сначала сохранять файлы на моем рабочем столе.
The Редактор Zeus может выделять и сворачивать HTML-файлы , он интегрируется с HTML Tidy и может легко редактировать файлы с сервера через ftp / sftp.
Он также поддерживает множество других языков (например, C / C ++, C #, Java, Javascript, PHP и т. д.)